Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm test fails on macOS Sierra #314

Closed
ThYpHo0n opened this issue Oct 13, 2016 · 5 comments
Closed

npm test fails on macOS Sierra #314

ThYpHo0n opened this issue Oct 13, 2016 · 5 comments

Comments

@ThYpHo0n
Copy link
Contributor

ThYpHo0n commented Oct 13, 2016

npm test fails on my mac with the following versions and output:

Node v4.5.0

[email protected] test /Volumes/Workspace/ts-loader
node test/run-tests.js

Using webpack version 1.13.2
Using typescript version 2.0.3

[...]

38 test suite(s) passed.

  • _FLAKY_errors
  • _FLAKY_tsconfigNotReadable
  • aliasResolution
  • basic
  • codeSplitting
  • conditionalRequire
  • declarationDeps
  • declarationOutput
  • declarationWatch
  • dependencyErrors
  • es3
  • es5
  • es6
  • es6codeSplitting
  • es6resolveParent
  • es6withCJS
  • externals
  • ignoreDiagnostics
  • instance
  • issue71
  • issue81
  • issue92
  • jsx
  • jsxPreserve
  • large
  • noErrorsPlugin
  • node
  • nodeResolution
  • nolib
  • npmLink
  • replacement
  • simpleDependency
  • sourceMaps
  • testLib
  • tsconfigInvalid
  • tsconfigInvalidFile
  • tsconfigSearch
  • typeSystemWatch

1 test suite(s) failed.

  • html-webpack-plugin

npm ERR! Darwin 16.0.0
npm ERR! argv "/Users/niklas/.nvm/versions/node/v4.5.0/bin/node" "/Users/niklas/.nvm/versions/node/v4.5.0/bin/npm" "run" "comparison-tests"
npm ERR! node v4.5.0
npm ERR! npm v2.15.9
npm ERR! code ELIFECYCLE
npm ERR! [email protected] comparison-tests: npm link ./test/comparison-tests/testLib && node test/comparison-tests/run-tests.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] comparison-tests script 'npm link ./test/comparison-tests/testLib && node test/comparison-tests/run-tests.js'.
npm ERR! This is most likely a problem with the ts-loader package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! npm link ./test/comparison-tests/testLib && node test/comparison-tests/run-tests.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs ts-loader
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR! npm owner ls ts-loader
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /Volumes/Workspace/ts-loader/npm-debug.log
child_process.js:508
throw err;
^

Error: Command failed: npm run comparison-tests
at checkExecSyncError (child_process.js:465:13)
at execSync (child_process.js:505:13)
at Object. (/Volumes/Workspace/ts-loader/test/run-tests.js:10:1)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Function.Module.runMain (module.js:441:10)
at startup (node.js:139:18)
at node.js:974:3
npm ERR! Test failed. See above for more details.

@johnnyreilly
Copy link
Member

Thanks for the report. The html-webpack-plugin test appears to have failed. That's a bit of a flaky test generally but I've never marked it as such. Does it give you a reason for failure?

@johnnyreilly
Copy link
Member

Also - you're running with npm v2. I'm curious as to whether the issue would occur if running npm v3....

@ThYpHo0n
Copy link
Contributor Author

Same with npm v3.10.8
Unfortunately there is no npm-debug.log generated therefore it doesn't give my a specific reason why it failed. Just the exit status code 1. I tried executing the tests manually and got assertion errors on the following tests:

  1. html-webpack-plugin should have the correct output:
  Uncaught AssertionError: output.txt is different between actual and expected
  + expected - actual

   Child html-webpack-plugin for "index.html":
            Asset    Size  Chunks       Chunk Names
       index.html  553 kB       0
       chunk    {0} index.html 536 kB [rendered]
  -        [0] ./~/html-webpack-plugin/lib/loader.js!./~/html-webpack-plugin/default_index.ejs 550 bytes {0}
  -        [1] ./~/html-webpack-plugin/~/lodash/lodash.js 535 kB {0}
  +        [0] ./~/html-webpack-plugin/lib/loader.js!./~/html-webpack-plugin/default_index.ejs 540 bytes {0}
  +        [1] ./~/lodash/lodash.js 535 kB {0}
           [2] (webpack)/buildin/module.js 241 bytes {0}

  at compareActualAndExpected (test/comparison-tests/create-and-execute-test.js:323:16)
  at test/comparison-tests/create-and-execute-test.js:237:21
  at Array.forEach (native)
  at Watching.handler (test/comparison-tests/create-and-execute-test.js:233:39)
  at Watching._done (node_modules/webpack/lib/Compiler.js:81:7)
  at Watching.<anonymous> (node_modules/webpack/lib/Compiler.js:61:18)
  at Compiler.emitRecords (node_modules/webpack/lib/Compiler.js:282:37)
  at Watching.<anonymous> (node_modules/webpack/lib/Compiler.js:58:19)
  at node_modules/webpack/lib/Compiler.js:275:11
  at Compiler.applyPluginsAsync (node_modules/webpack/node_modules/tapable/lib/Tapable.js:60:69)
  at Compiler.afterEmit (node_modules/webpack/lib/Compiler.js:272:8)
  at Compiler.<anonymous> (node_modules/webpack/lib/Compiler.js:267:14)
  at node_modules/webpack/node_modules/async/lib/async.js:52:16
  at done (node_modules/webpack/node_modules/async/lib/async.js:246:17)
  at node_modules/webpack/node_modules/async/lib/async.js:44:16
  at node_modules/enhanced-resolve/node_modules/graceful-fs/graceful-fs.js:43:10
  at node_modules/fs-extra/node_modules/graceful-fs/graceful-fs.js:43:10
  at FSReqWrap.oncomplete (fs.js:82:15)
  1. html-webpack-plugin should work with transpile:
  Uncaught AssertionError: output.txt is different between actual and expected
  + expected - actual

   Child html-webpack-plugin for "index.html":
            Asset    Size  Chunks       Chunk Names
       index.html  553 kB       0
       chunk    {0} index.html 536 kB [rendered]
  -        [0] ./~/html-webpack-plugin/lib/loader.js!./~/html-webpack-plugin/default_index.ejs 550 bytes {0}
  -        [1] ./~/html-webpack-plugin/~/lodash/lodash.js 535 kB {0}
  +        [0] ./~/html-webpack-plugin/lib/loader.js!./~/html-webpack-plugin/default_index.ejs 540 bytes {0}
  +        [1] ./~/lodash/lodash.js 535 kB {0}
           [2] (webpack)/buildin/module.js 241 bytes {0}

  at compareActualAndExpected (test/comparison-tests/create-and-execute-test.js:323:16)
  at test/comparison-tests/create-and-execute-test.js:237:21
  at Array.forEach (native)
  at Watching.handler (test/comparison-tests/create-and-execute-test.js:233:39)
  at Watching._done (node_modules/webpack/lib/Compiler.js:81:7)
  at Watching.<anonymous> (node_modules/webpack/lib/Compiler.js:61:18)
  at Compiler.emitRecords (node_modules/webpack/lib/Compiler.js:282:37)
  at Watching.<anonymous> (node_modules/webpack/lib/Compiler.js:58:19)
  at node_modules/webpack/lib/Compiler.js:275:11
  at Compiler.applyPluginsAsync (node_modules/webpack/node_modules/tapable/lib/Tapable.js:60:69)
  at Compiler.afterEmit (node_modules/webpack/lib/Compiler.js:272:8)
  at Compiler.<anonymous> (node_modules/webpack/lib/Compiler.js:267:14)
  at node_modules/webpack/node_modules/async/lib/async.js:52:16
  at done (node_modules/webpack/node_modules/async/lib/async.js:246:17)
  at node_modules/webpack/node_modules/async/lib/async.js:44:16
  at node_modules/enhanced-resolve/node_modules/graceful-fs/graceful-fs.js:43:10
  at node_modules/fs-extra/node_modules/graceful-fs/graceful-fs.js:43:10
  at FSReqWrap.oncomplete (fs.js:82:15)

@johnnyreilly
Copy link
Member

Yeah I don't think this is anything to be concerned about. It's highlighting the difference between 540 bytes and 550 bytes in one case and

./~/html-webpack-plugin/~/lodash/lodash.js 535 kB {0}

in the other:
+ [1] ./~/lodash/lodash.js 535 kB {0}

I'm not totally certain as to the cause but I'm not sure it's worth drilling into. I may mark this as a flaky test.

The important thing is you were able to run the tests (even if one failed.)

@johnnyreilly
Copy link
Member

closing as html-webpack-plugin now marked as flaky

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants