angular-quickstart-lib icon indicating copy to clipboard operation
angular-quickstart-lib copied to clipboard

AOT e2e test failure

Open h657070128 opened this issue 8 years ago • 6 comments

Hi, sorry for bothering again. I cloned the project and did not make any changes. After I run npm install, I am trying to run npm run integration to do an e2e test. But it failed. I looked into it and found bundle.js under integration/dist is not generated. Why? I found there is a warning during rollup:

(node:34922) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: 'Subject' is not exported by ../node_modules/rxjs/Subject.js
(node:34922) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

I am not sure if it's preventing the code being packaged. I am wondering are you guys using this seed can run it successfully?

h657070128 avatar Jul 21 '17 09:07 h657070128

@h657070128 I commented this include: ['node_modules/rxjs/**'], line in integration/build.js and this solved the problem.

FriOne avatar Aug 18 '17 18:08 FriOne

I have a similar issue. I cloned the project, ran npm install then npm run integration.

npm ERR! code ENOLOCAL npm ERR! Could not install from "../dist" as it does not contain a package.json file.

npm ERR! A complete log of this run can be found in: npm ERR! /Users/tester/.npm/_logs/2017-08-24T23_07_42_959Z-debug.log npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] preintegration: npm run build && cd integration && npm run clean && npm install npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] preintegration script.

playground avatar Aug 24 '17 23:08 playground

to resolve the aot build issue, downgrade in integration/package.json following package:

    "rollup-plugin-node-resolve": "2.0.0",

https://github.com/rollup/rollup-plugin-node-resolve/issues/94 https://github.com/theatersoft/client/commit/2202137397fd71bfea3c9e5247f7dc29d5ac2a27

regarding the "../dist" issue:

I think npm introduced in some recent version to symlink locally installed packages. This is the issue here. What I did in integration/package.json, I changed the clean target to following:

    "clean": "rimraf aot/ dist/",

Note: this works on current versions of npm, but might break the clean up on older versions.

mmmichl avatar Sep 04 '17 21:09 mmmichl

@mmmichl downgrading rollup-plugin-node-resolve worked for me. I checked also the bundle.js under integration and it is generated. So maybe it is the only necessary point to fix the issue?

muhammedgaygisiz avatar May 13 '20 21:05 muhammedgaygisiz

Thank for your response, but in the meantime I switched to the angular CLI for lib development.

mmmichl avatar May 14 '20 06:05 mmmichl

Ok, i was thinking about switching to this seed project from angular cli lib devevelopment :D

muhammedgaygisiz avatar May 14 '20 07:05 muhammedgaygisiz