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

yarn versus NPM accuracy, Yarn Fails, where NPM succeeds. #1015

Closed
jaygarcia opened this issue Oct 13, 2016 · 4 comments
Closed

yarn versus NPM accuracy, Yarn Fails, where NPM succeeds. #1015

jaygarcia opened this issue Oct 13, 2016 · 4 comments

Comments

@jaygarcia
Copy link

jaygarcia commented Oct 13, 2016

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
@kaicataldo
Copy link
Contributor

kaicataldo commented Oct 13, 2016

@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 > minimatch@0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
warning mocha > to-iso-string@0.0.2: to-iso-string has been deprecated, use @segment/to-iso-string instead.
warning mocha > jade@0.26.3: Jade has been renamed to pug, please install the latest version of pug instead of jade
warning beefy > xtend > object-keys@0.4.0:
[2/4] 🚚  Fetching packages...
warning benchmark@1.0.0: 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.

@kaicataldo
Copy link
Contributor

Ah, this looks like a dupe of #987

@jaygarcia
Copy link
Author

Thanks @kaicataldo , closing this dupe.

@viridia
Copy link

viridia commented Oct 25, 2016

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).

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

3 participants