dont-break icon indicating copy to clipboard operation
dont-break copied to clipboard

npm test seems to hang indefinitely

Open mtscout6 opened this issue 10 years ago • 9 comments

I was trying to see if this would work in react-bootstrap against our downstream dependent react-router-bootstrap. I added react-router-bootstrap to the .dont-break file in the root of the react-bootstrap repo and ran ./node_modules/.bin/dont-break I get the following output and it has been hanging for an hour:

➜  react-bootstrap git:(dont-break) ✗ ./node_modules/.bin/dont-break
[email protected] - Checks if the current version of your package would break dependent projects
in folder /Users/smithm/dev/react-bootstrap
testing dependents [ 'react-router-bootstrap' ]
testing react-router-bootstrap
  installing react-router-bootstrap
installed into /tmp/[email protected]
installing dev dependencies /tmp/[email protected]/lib/node_modules/react-router-bootstrap
  NPM install in current folder
restoring current directory /Users/smithm/dev/react-bootstrap
  npm test

Am I missing something?

mtscout6 avatar May 28 '15 16:05 mtscout6

Will try running today

bahmutov avatar May 28 '15 16:05 bahmutov

Yup, times out. Something is wrong! Will investigate, need to stream the test output, rather than wait until the child process finishes

bahmutov avatar May 31 '15 03:05 bahmutov

Seeing this also :-( https://codeship.com/projects/85475/builds/6272691

kentcdodds avatar Jun 14 '15 05:06 kentcdodds

Can you guys try again against [email protected] please? It streams test output / errors

bahmutov avatar Jun 16 '15 14:06 bahmutov

This is what I get now:

... more logs...


.

Finished in 1.249 seconds
1 test, 1 assertion, 0 failures

15:04:40.980 INFO - Executing: [delete session: 53459d8e-ca57-4e16-b8eb-7000010d6bce])
15:04:41.535 INFO - Done: [delete session: 53459d8e-ca57-4e16-b8eb-7000010d6bce]
[launcher] 0 instance(s) of WebDriver still running
[launcher] chrome #1 passed
tests work in /tmp/[email protected]/lib/node_modules/angular-formly-example
all dependents tested
PASS: Current version does not break dependents
restored folder /home/rof/src/github.com/formly-js/angular-formly
finishing with success? true



--------------------------------------------------------------------------------
This command didn't output anything for for a while, thus we stopped it.
If the error is on our end please inform us so we can help you to fix this.
--------------------------------------------------------------------------------

kentcdodds avatar Jun 16 '15 15:06 kentcdodds

Here's my command: dont-break -d angular-formly-example

kentcdodds avatar Jun 16 '15 15:06 kentcdodds

Failed for me as well. Here's the output:

➜  react-bootstrap git:(dont-break) ./node_modules/.bin/dont-break
[email protected] - Checks if the current version of your package would break dependent projects
in folder /Users/smithm/dev/react-bootstrap
testing dependents
react-router-bootstrap
testing "react-router-bootstrap"
testing folder "/tmp/[email protected]"
  installing react-router-bootstrap
npm WARN peerDependencies The peer dependency react-bootstrap@>=0.22.4 included from react-router-bootstrap will no
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency
npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.
npm WARN peerDependencies The peer dependency react-router@>=0.13.1 included from react-router-bootstrap will no
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency
npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.
npm WARN peerDependencies The peer dependency [email protected] included from react-router will no
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency
npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.
npm WARN peerDependencies The peer dependency react@>=0.13 included from react-bootstrap will no
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency
npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.
[email protected] /tmp/[email protected]/lib/node_modules/react
└── [email protected] ([email protected], [email protected])

[email protected] /tmp/[email protected]/lib/node_modules/react-bootstrap
└── [email protected]

[email protected] /tmp/[email protected]/lib/node_modules/react-router
├── [email protected]
└── [email protected]

[email protected] /tmp/[email protected]/lib/node_modules/react-router-bootstrap
└── [email protected]
installed into /tmp/[email protected]
installing dev dependencies /tmp/[email protected]/lib/node_modules/react-router-bootstrap
  NPM install in current folder
npm WARN package.json [email protected] license should be a valid SPDX license expression
npm WARN engine [email protected]: wanted: {"node":"~0.8 || ~0.10"} (current: {"node":"2.2.1","npm":"2.11.0"})
npm WARN prefer global [email protected] should be installed with -g

> [email protected] install /private/tmp/[email protected]/lib/node_modules/react-router-bootstrap/node_modules/babel/node_modules/chokidar/node_modules/fsevents
> node-gyp rebuild

  SOLINK_MODULE(target) Release/.node
  SOLINK_MODULE(target) Release/.node: Finished
  CXX(target) Release/obj.target/fse/fsevents.o
  SOLINK_MODULE(target) Release/fse.node
  SOLINK_MODULE(target) Release/fse.node: Finished

> [email protected] install /private/tmp/[email protected]/lib/node_modules/react-router-bootstrap/node_modules/karma/node_modules/chokidar/node_modules/fsevents
> node-gyp rebuild

  SOLINK_MODULE(target) Release/.node
  SOLINK_MODULE(target) Release/.node: Finished
  CXX(target) Release/obj.target/fse/fsevents.o
  SOLINK_MODULE(target) Release/fse.node
  SOLINK_MODULE(target) Release/fse.node: Finished

> [email protected] install /private/tmp/[email protected]/lib/node_modules/react-router-bootstrap/node_modules/phantomjs
> node install.js

Download already available at /var/folders/rt/phr89yfj2fl206jtk0l86724th0_1v/T/phantomjs/phantomjs-1.9.8-macosx.zip
Extracting zip contents
Removing /private/tmp/[email protected]/lib/node_modules/react-router-bootstrap/node_modules/phantomjs/lib/phantom
Copying extracted folder /var/folders/rt/phr89yfj2fl206jtk0l86724th0_1v/T/phantomjs/phantomjs-1.9.8-macosx.zip-extract-1434468235532/phantomjs-1.9.8-macosx -> /private/tmp/[email protected]/lib/node_modules/react-router-bootstrap/node_modules/phantomjs/lib/phantom
Writing location.js file
Done. Phantomjs binary available at /private/tmp/[email protected]/lib/node_modules/react-router-bootstrap/node_modules/phantomjs/lib/phantom/bin/phantomjs

> [email protected] install /private/tmp/[email protected]/lib/node_modules/react-router-bootstrap/node_modules/webpack-dev-server/node_modules/socket.io/node_modules/engine.io/node_modules/ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)

  CXX(target) Release/obj.target/bufferutil/src/bufferutil.o

> [email protected] install /private/tmp/[email protected]/lib/node_modules/react-router-bootstrap/node_modules/webpack-dev-server/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)

  CXX(target) Release/obj.target/bufferutil/src/bufferutil.o

> [email protected] install /private/tmp/[email protected]/lib/node_modules/react-router-bootstrap/node_modules/webpack/node_modules/watchpack/node_modules/chokidar/node_modules/fsevents
> node-gyp rebuild

  SOLINK_MODULE(target) Release/.node
  SOLINK_MODULE(target) Release/.node: Finished
  CXX(target) Release/obj.target/fse/fsevents.o
  SOLINK_MODULE(target) Release/fse.node
  SOLINK_MODULE(target) Release/fse.node: Finished
npm WARN prefer global [email protected] should be installed with -g

> [email protected] install /private/tmp/[email protected]/lib/node_modules/react-router-bootstrap/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)

  CXX(target) Release/obj.target/bufferutil/src/bufferutil.o

> [email protected] prepublish /private/tmp/[email protected]/lib/node_modules/react-router-bootstrap
> npm run build


> [email protected] build /private/tmp/[email protected]/lib/node_modules/react-router-bootstrap
> babel src --out-dir=lib && webpack && COMPRESS=1 webpack

src doesn't exist

npm ERR! Darwin 14.3.0
npm ERR! argv "/usr/local/bin/iojs" "/usr/local/bin/npm" "run" "build"
npm ERR! node v2.2.1
npm ERR! npm  v2.11.0
npm ERR! code ELIFECYCLE
npm ERR! [email protected] build: `babel src --out-dir=lib && webpack && COMPRESS=1 webpack`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the [email protected] build script 'babel src --out-dir=lib && webpack && COMPRESS=1 webpack'.
npm ERR! This is most likely a problem with the react-router-bootstrap package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     babel src --out-dir=lib && webpack && COMPRESS=1 webpack
npm ERR! You can get their info via:
npm ERR!     npm owner ls react-router-bootstrap
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /private/tmp/[email protected]/lib/node_modules/react-router-bootstrap/npm-debug.log

npm ERR! Darwin 14.3.0
npm ERR! argv "/usr/local/bin/iojs" "/usr/local/bin/npm" "install"
npm ERR! node v2.2.1
npm ERR! npm  v2.11.0
npm ERR! code ELIFECYCLE
npm ERR! [email protected] prepublish: `npm run build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] prepublish script 'npm run build'.
npm ERR! This is most likely a problem with the react-router-bootstrap package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     npm run build
npm ERR! You can get their info via:
npm ERR!     npm owner ls react-router-bootstrap
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /private/tmp/[email protected]/lib/node_modules/react-router-bootstrap/npm-debug.log
npm returned 1
errors:
npm WARN package.json [email protected] license should be a valid SPDX license expression
npm WARN engine [email protected]: wanted: {"node":"~0.8 || ~0.10"} (current: {"node":"2.2.1","npm":"2.11.0"})
npm WARN prefer global [email protected] should be installed with -g
npm WARN prefer global [email protected] should be installed with -g
src doesn't exist

npm ERR! Darwin 14.3.0
npm ERR! argv "/usr/local/bin/iojs" "/usr/local/bin/npm" "run" "build"
npm ERR! node v2.2.1
npm ERR! npm  v2.11.0
npm ERR! code ELIFECYCLE
npm ERR! [email protected] build: `babel src --out-dir=lib && webpack && COMPRESS=1 webpack`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the [email protected] build script 'babel src --out-dir=lib && webpack && COMPRESS=1 webpack'.
npm ERR! This is most likely a problem with the react-router-bootstrap package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     babel src --out-dir=lib && webpack && COMPRESS=1 webpack
npm ERR! You can get their info via:
npm ERR!     npm owner ls react-router-bootstrap
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /private/tmp/[email protected]/lib/node_modules/react-router-bootstrap/npm-debug.log

npm ERR! Darwin 14.3.0
npm ERR! argv "/usr/local/bin/iojs" "/usr/local/bin/npm" "install"
npm ERR! node v2.2.1
npm ERR! npm  v2.11.0
npm ERR! code ELIFECYCLE
npm ERR! [email protected] prepublish: `npm run build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] prepublish script 'npm run build'.
npm ERR! This is most likely a problem with the react-router-bootstrap package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     npm run build
npm ERR! You can get their info via:
npm ERR!     npm owner ls react-router-bootstrap
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /private/tmp/[email protected]/lib/node_modules/react-router-bootstrap/npm-debug.log

Could not install dependencies in /tmp/[email protected]/lib/node_modules/react-router-bootstrap
{ code: 1,
  errors: 'npm WARN package.json [email protected] license should be a valid SPDX license expression\nnpm WARN engine [email protected]: wanted: {"node":"~0.8 || ~0.10"} (current: {"node":"2.2.1","npm":"2.11.0"})\nnpm WARN prefer global [email protected] should be installed with -g\nnpm WARN prefer global [email protected] should be installed with -g\nsrc doesn\'t exist\n\nnpm ERR! Darwin 14.3.0\nnpm ERR! argv "/usr/local/bin/iojs" "/usr/local/bin/npm" "run" "build"\nnpm ERR! node v2.2.1\nnpm ERR! npm  v2.11.0\nnpm ERR! code ELIFECYCLE\nnpm ERR! [email protected] build: `babel src --out-dir=lib && webpack && COMPRESS=1 webpack`\nnpm ERR! Exit status 2\nnpm ERR! \nnpm ERR! Failed at the [email protected] build script \'babel src --out-dir=lib && webpack && COMPRESS=1 webpack\'.\nnpm ERR! This is most likely a problem with the react-router-bootstrap package,\nnpm ERR! not with npm itself.\nnpm ERR! Tell the author that this fails on your system:\nnpm ERR!     babel src --out-dir=lib && webpack && COMPRESS=1 webpack\nnpm ERR! You can get their info via:\nnpm ERR!     npm owner ls react-router-bootstrap\nnpm ERR! There is likely additional logging output above.\n\nnpm ERR! Please include the following file with any support request:\nnpm ERR!     /private/tmp/[email protected]/lib/node_modules/react-router-bootstrap/npm-debug.log\n\nnpm ERR! Darwin 14.3.0\nnpm ERR! argv "/usr/local/bin/iojs" "/usr/local/bin/npm" "install"\nnpm ERR! node v2.2.1\nnpm ERR! npm  v2.11.0\nnpm ERR! code ELIFECYCLE\nnpm ERR! [email protected] prepublish: `npm run build`\nnpm ERR! Exit status 1\nnpm ERR! \nnpm ERR! Failed at the [email protected] prepublish script \'npm run build\'.\nnpm ERR! This is most likely a problem with the react-router-bootstrap package,\nnpm ERR! not with npm itself.\nnpm ERR! Tell the author that this fails on your system:\nnpm ERR!     npm run build\nnpm ERR! You can get their info via:\nnpm ERR!     npm owner ls react-router-bootstrap\nnpm ERR! There is likely additional logging output above.\n\nnpm ERR! Please include the following file with any support request:\nnpm ERR!     /private/tmp/[email protected]/lib/node_modules/react-router-bootstrap/npm-debug.log\n' }
FAIL: Current version breaks dependents
restored folder /Users/smithm/dev/react-bootstrap
finishing with success? false

Near as I can tell this implies that the downstream should include tests in the npm release. Is that a pre-requisite of downstream modules?

mtscout6 avatar Jun 16 '15 15:06 mtscout6

@mtscout6 seems the downstream project does not include source / unit tests, thus trying to run the build and test command fails. There is a feature request to be able to test against git repos and not against the published NPM modules, see bahmutov/dont-break/issues/15

bahmutov avatar Jun 16 '15 15:06 bahmutov

@kentcdodds I cannot see the codeship project, seems weird that the project keeps running - the last line is actually the exit, see https://github.com/bahmutov/dont-break/blob/master/index.js#L20

bahmutov avatar Jun 16 '15 15:06 bahmutov