-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Create command fails with npm not relative to node #1353
Comments
Oh dang, I forgot that could be a thing. Thanks for the bug report! (Homebrew's |
That may very well be so, but I think the community you'd have to convince is rather huge ^^ |
Oh, sure, I didn't mean to imply I'm not going to fix this, I just completely forgot about this case. |
Yeah, I got that. I was just joking :) |
Published in v3.0.0-beta.12 |
Wouldn't it be better to try to locate npm by way of |
The builtin npmrc is a rare edge-case; if it isn’t in the standard location, it’s not likely to exist anywhere.
… On Mar 30, 2018, at 06:31, Aleksander Heintz ***@***.***> wrote:
Wouldn't it be better to try to locate npm by way of where npm (ie. scan $PATH). That way you would get the noe the user is using (unless they specifically ran another one).
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub, or mute the thread.
|
This thread has been automatically locked because there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
The create command fails, because it's trying to stat a file that doesn't exist:
It should not assume npm to be relative to node.
Expected Behavior
It should not crash.
Current Behavior
It's crashing.
Workaround
In my case, creating a symlink to
npm
next to the node executable solved the problem.Steps to Reproduce (for bugs)
/usr/local/Cellar/node/9.9.0/bin/node
, whereasnpm
is installed at/usr/local/lib/node_modules/npm/bin/npm-cli.js
.lerna create <name>
.lerna.json
lerna-debug.log
0 silly argv { _: [ 'create' ], 0 silly argv help: false, 0 silly argv h: false, 0 silly argv version: false, 0 silly argv v: false, 0 silly argv 'reject-cycles': undefined, 0 silly argv rejectCycles: undefined, 0 silly argv sort: undefined, 0 silly argv ci: false, 0 silly argv lernaVersion: '3.0.0-beta.11', 0 silly argv '$0': '/usr/local/bin/lerna', 0 silly argv loglevel: undefined, 0 silly argv concurrency: undefined, 0 silly argv 'max-buffer': undefined, 0 silly argv name: '@yolodev/workdir-pid', 0 silly argv loc: undefined, 0 silly argv access: undefined, 0 silly argv bin: undefined, 0 silly argv description: undefined, 0 silly argv dependencies: undefined, 0 silly argv 'es-module': undefined, 0 silly argv homepage: undefined, 0 silly argv keywords: undefined, 0 silly argv license: undefined, 0 silly argv private: undefined, 0 silly argv registry: undefined, 0 silly argv tag: undefined, 0 silly argv yes: undefined } 1 info version 3.0.0-beta.11 2 verbose rootPath /Users/alxandr/hub/yolodev-aspnet-utils 3 silly isInitialized 4 silly isInitialized true 5 error Error: ENOENT: no such file or directory, lstat '/usr/local/Cellar/node/9.9.0/bin/npm' 5 error at Object.realpathSync (fs.js:1690:15) 5 error at builtinNpmrc (/usr/local/lib/node_modules/lerna/node_modules/@lerna/create/lib/builtin-npmrc.js:12:26) 5 error at CreateCommand.initialize (/usr/local/lib/node_modules/lerna/node_modules/@lerna/create/index.js:89:23) 5 error at Promise.resolve.then (/usr/local/lib/node_modules/lerna/node_modules/@lerna/command/index.js:220:24) 5 error at <anonymous>
Context
Your Environment
OSX, node installed from homebrew. Don't remember where npm is installed from, but considering it's path I'd say it's likely installed using
npm
itself.lerna --version
npm --version
yarn --version
node --version
The text was updated successfully, but these errors were encountered: