Comments (9)
npm run test also failed, this is the error log:
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'run',
1 verbose cli '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: D:\nvm\v8.6.0\node_modules\npm\bin\node-gyp-bin;F:\demo\examples\node_modules\.bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;D:\Git\cmd;C:\Program Files\MongoDB\Server\3.4\bin\;C:\Users\Administrator.TUVRNIXJMBJSWX6\AppData\Roaming\nvm;C:\Program Files\nodejs;C:\Users\Administrator.TUVRNIXJMBJSWX6\AppData\Local\Microsoft\WindowsApps;D:\编辑器VsCode\Microsoft VS Code\bin;D:\nvm;C:\Program Files\nodejs
9 verbose lifecycle [email protected]~test: CWD: F:\demo\examples
10 silly lifecycle [email protected]~test: Args: [ '/d /s /c', 'make test' ]
11 silly lifecycle [email protected]~test: Returned: code: 1 signal: null
12 info lifecycle [email protected]~test: Failed to exec test script
13 verbose stack Error: [email protected] test: `make test`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (D:\nvm\v8.6.0\node_modules\npm\lib\utils\lifecycle.js:289:16)
13 verbose stack at emitTwo (events.js:125:13)
13 verbose stack at EventEmitter.emit (events.js:213:7)
13 verbose stack at ChildProcess.<anonymous> (D:\nvm\v8.6.0\node_modules\npm\lib\utils\spawn.js:40:14)
13 verbose stack at emitTwo (events.js:125:13)
13 verbose stack at ChildProcess.emit (events.js:213:7)
13 verbose stack at maybeClose (internal/child_process.js:927:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
14 verbose pkgid [email protected]
15 verbose cwd F:\demo\examples
16 verbose Windows_NT 10.0.15063
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "test"
18 verbose node v8.6.0
19 verbose npm v5.3.0
20 error code ELIFECYCLE
21 error errno 1
22 error [email protected] test: `make test`
22 error Exit status 1
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 [ 1, true ]
from examples.
test.js是个测试脚本,你先安装Mocha,然后运行Mocha 404/test.js @CyanGlory
from examples.
Once you've done an npm install
, run npm test
.
If you'd like to specifically target the tests in base-auth/test.js
, change the highest-level describe
to describe.only
, like so:
describe.only('Koa Basic Auth', function() { ...
npm test
actually runs a Makefile in the background, not just simply running the test file with the Node command line.
from examples.
hi @CyanGlory unfortunately, the current "npm test" command is based on a makefile to manage all the scripts to execute. "make" is not natively available on windows, you need to install it (https://cognitivewaves.wordpress.com/makefiles-windows/)
from examples.
I was curious, why use make and not just npm?
from examples.
I think that this is what tj used to use to manage scripting orchestration in his projects.
from examples.
I was curious, why use make and not just npm?
from examples.
this is old, converting to npm run
is welcomed
from examples.
I submitted a PR to use npm run instead.
from examples.
Related Issues (20)
- Koa <-> Express integration HOT 2
- It's not about stream HOT 1
- Some question about "404" example HOT 1
- compose: undefined in logger HOT 1
- Best place to add the following resources? HOT 3
- bash: make: command not found HOT 1
- multipart/app.js - files is accessed directly from ctx.request as opposed to ctx.request.body HOT 2
- bug: upload example HOT 1
- stream-server-side-events: response size become larger and larger.
- Update koa-router and swig HOT 1
- Add websocket example
- Properties not working for ctx.throw
- Javascript qstn HOT 2
- Upload example no longer works HOT 1
- base-auth/app.js
- 404 - no correct 404 page for exceptions in downstream middleware HOT 8
- [Suggestion] Add coding style check HOT 3
- Koa2 examples of streaming? HOT 2
- update examples to koa@2 HOT 8
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 examples.