Comments (8)
Hi @ndabAP ,I got the same problem. How did you solve? Thank you
from npm-lifecycle.
Oh my god, I'm so sorry. I imported the wrong app.js
. Everything is okay! Sorry for taking your time.
from npm-lifecycle.
No problems, glad you solved it
from npm-lifecycle.
@ndabAP What is the error exactly? I can see only stack trace (I'm author of module-alias)
from npm-lifecycle.
npm ERR! code ELIFECYCLE
npm ERR! errno 2
All routes inside unit tests return status code 404. It works as expected outside of an unit test.
from npm-lifecycle.
I bet there is something more ;) Error at EventEmitter ..
here at the "..." should be some info. Without knowing what exactly caused the error can't say for sure if it's caused by module-alias
from npm-lifecycle.
This is the full error log:
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'run', 'test' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'pretest', 'test', 'posttest' ]
5 info lifecycle [email protected] pretest: [email protected]
6 info lifecycle [email protected] test: [email protected]
7 verbose lifecycle [email protected] test: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected] test: PATH: /usr/lib/node_modules/npm/bin/node-gyp-bin:/app/backend/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
9 verbose lifecycle [email protected] test: CWD: /app/backend
10 silly lifecycle [email protected] test: Args: [ '-c',
10 silly lifecycle 'NODE_ENV=test mocha --require babel-register test/**/*sign-in.test.js' ]
11 silly lifecycle [email protected] test: Returned: code: 2 signal: null
12 info lifecycle [email protected] test: Failed to exec test script
13 verbose stack Error: [email protected] test:NODE_ENV=test mocha --require babel-register test/**/*sign-in.test.js
13 verbose stack Exit status 2
13 verbose stack at EventEmitter. (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:280:16)
13 verbose stack at emitTwo (events.js:126:13)
13 verbose stack at EventEmitter.emit (events.js:214:7)
13 verbose stack at ChildProcess. (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at emitTwo (events.js:126:13)
13 verbose stack at ChildProcess.emit (events.js:214:7)
13 verbose stack at maybeClose (internal/child_process.js:925:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
14 verbose pkgid [email protected]
15 verbose cwd /app/backend
16 verbose Linux 4.4.0-98-generic
17 verbose argv "/usr/bin/node" "/usr/bin/npm" "run" "test"
18 verbose node v8.9.0
19 verbose npm v5.5.1
20 error code ELIFECYCLE
21 error errno 2
22 error [email protected] test:NODE_ENV=test mocha --require babel-register test/**/*sign-in.test.js
22 error Exit status 2
23 error Failed at the [email protected] test script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 2, true ]
Sorry for bothering you if it's not caused by your module. My unit test worked some weeks ago and I switched to your great module. But now they fail ;)
from npm-lifecycle.
Oh my god, I'm so sorry. I imported the wrong
app.js
. Everything is okay! Sorry for taking your time.
How you solved? I have the same issue...
from npm-lifecycle.
Related Issues (20)
- Warning: Possible EventEmitter memory leak detected. 11 SIGINT listeners added. HOT 2
- Run-script commands don't load environment vars with WSL
- node_modules/.bin directory not being added to PATH on Windows
- MaxListenersExceededWarning when use postinstall HOT 1
- Documentation on API usage HOT 1
- fatal: 'submodule' appears to be a git command, but we were not able to execute it. Maybe git-submodule is broken? HOT 2
- npm hooks scripts breaks on windows HOT 1
- Error: Version doesn´t exist in botfile.js HOT 1
- Error:npm-lifecycle\index.js:301:16
- Tar package vulnerability on install HOT 4
- Enhancement: Use win32 platform specific casing for env.path if present HOT 2
- Security issue from node-gyp
- Node App crashes HOT 3
- node-gyp Visual Studio 2019 compatibility
- env.npm_execpath and $execPath
- [BUG] npm falsely reports hard-coded ENOENT as postinstall error when root
- postinstall "cannot run in wd" when working directory does not match the package name (in docker) HOT 3
- [QUESTION] Why SIGTERM is passed only one time?
- [BUG] stack Exit status 3221226505 running scripts in Node windows-x86
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from npm-lifecycle.