Do you want to request a _feature_ or report a _bug_?
I'm cloning this React & node bootstrap: https://github.com/erikras/react-redux-universal-hot-example
When i execute npm i, all works as expected. However, after cloning, a yarn fails while executing an install script for PhantomJS.
Video demo: https://www.youtube.com/watch?v=IsuUmw5cS9I
Steps:
git clone https://github.com/erikras/react-redux-universal-hot-example yarn_test
cd yarn_test
yarn install
...
warning Unmet peer dependency "history@^1.12.1 || ^2.0.0".
warning Incorrect peer dependency "react@^15.3.2".
[4/4] 📃 Building fresh packages...
[1/3] ⡀ react-router
[2/3] ⡀ node-sass
[3/3] ⡀ phantomjs: at Function.Module._load (module.js:438:3)
[-/3] ⡀ waiting...
error /private/tmp/yarn_test/node_modules/phantomjs: Command failed.
Exit code: 1
Command: sh
Arguments: -c node install.js
Directory: /private/tmp/yarn_test/node_modules/phantomjs
Output:
module.js:471
throw err;
^
Error: Cannot find module 'graceful-fs'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/private/tmp/yarn_test/node_modules/phantomjs/node_modules/fs-extra/lib/index.js:4:11)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at SpawnError (/usr/local/lib/node_modules/yarn/lib/errors.js:18:1)
at ChildProcess.proc.on.code (/usr/local/lib/node_modules/yarn/lib/util/child.js:107:15)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at maybeClose (internal/child_process.js:877:16)
at Socket.<anonymous> (internal/child_process.js:334:11)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at Pipe._handle.close [as _onclose] (net.js:498:12)
info Visit http://yarnpkg.com/en/docs/cli/install for documentation about this command.
commander-keen:yarn_test jgarcia$
(Mac OS Sierra)
Darwin commander-keen.local 16.0.0 Darwin Kernel Version 16.0.0: Mon Aug 29 17:56:20 PDT 2016; root:xnu-3789.1.32~3/RELEASE_X86_64 x86_64
node --version
v6.8.0
@I'm seeing something similar but with a different package (which is a dependency of phantomjs-prebuild). Running yarn install a second time seems to install correctly.
Node version is 6.8.0 and yarn installed with npm.
Here's the output:
yarn install v0.15.1
info No lockfile found.
[1/4] 🔍 Resolving packages...
warning mocha > glob > [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
warning mocha > [email protected]: to-iso-string has been deprecated, use @segment/to-iso-string instead.
warning mocha > [email protected]: Jade has been renamed to pug, please install the latest version of pug instead of jade
warning beefy > xtend > [email protected]:
[2/4] 🚚 Fetching packages...
warning [email protected]: The engine "rhino" appears to be invalid.
[3/4] 🔗 Linking dependencies...
warning Unmet peer dependency "eslint@>=2.0.0".
[4/4] 📃 Building fresh packages...
[1/1] ⠠ phantomjs-prebuilt
[-/1] ⠐ waiting...
[-/1] ⠐ waiting...
[-/1] ⠐ waiting...
error /Users/cataldo/Code/eslint/node_modules/phantomjs-prebuilt: Command failed.
Exit code: 1
Command: sh
Arguments: -c node install.js
Directory: /Users/cataldo/Code/eslint/node_modules/phantomjs-prebuilt
Output:
module.js:471
throw err;
^
Error: Cannot find module 'stringstream'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/Users/cataldo/Code/eslint/node_modules/request/request.js:15:20)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at SpawnError (/Users/cataldo/.nvm/versions/node/v6.8.0/lib/node_modules/yarn/lib/errors.js:18:1)
at ChildProcess.proc.on.code (/Users/cataldo/.nvm/versions/node/v6.8.0/lib/node_modules/yarn/lib/util/child.js:107:15)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at maybeClose (internal/child_process.js:877:16)
at Socket.<anonymous> (internal/child_process.js:334:11)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at Pipe._handle.close [as _onclose] (net.js:498:12)
info Visit http://yarnpkg.com/en/docs/cli/install for documentation about this command.
Ah, this looks like a dupe of https://github.com/yarnpkg/yarn/issues/987
Thanks @kaicataldo , closing this dupe.
I am using the latest version of yarn (0.16.1) and I'm seeing a similar problem. I have a package that depends on graceful-fs, but it is not being installed. (It is listed in the lock file, but it doesn't appear to be present in node_modules).
Most helpful comment
I am using the latest version of yarn (0.16.1) and I'm seeing a similar problem. I have a package that depends on graceful-fs, but it is not being installed. (It is listed in the lock file, but it doesn't appear to be present in node_modules).