Repository navigation
Can't install package globally on Windows #859
Description
Activity
- changed the title
[-]Can't install global package on Windows[/-][+]Can't globally install package on Windows[/+]on Oct 12, 2016 - changed the title
[-]Can't globally install package on Windows[/-][+]Can't install package globally on Windows[/+]on Oct 12, 2016 Hi
Same problem with Windows 7 Pro (x64)
Seems to be happening where there's a dependency on abbrev as this is also impacting installing yo
> yarn global add yo yarn global v0.15.1 warning No license field [1/4] Resolving packages... warning yo > fullname > npmconf@2.1.2: this package has been reintegrated into npm and is now out of date with respect to npm [2/4] Fetching packages... [3/4] Linking dependencies... error ENOENT: no such file or directory, open 'C:\Users\gavinb\AppData\Local\Yarn\.global\node_modules\abbrev\abbrev.js' at Error (native) info Visit http://yarnpkg.com/en/docs/cli/global for documentation about this command. > node -v v4.5.0Windows 10 Build 14396
Edit:
I also tried manually installing abbrev:
> yarn global add abbrev yarn global v0.15.1 warning No license field [1/4] Resolving packages... [2/4] Fetching packages... [3/4] Linking dependencies... [4/4] Building fresh packages... warning abbrev@1.0.9 has no binaries Done in 2.92s.Looks like abbrev may be a package which builds it's native version on the machine when it's installed via npm.
Also in window10 (x64) , I can't globally install.
In linking dependencies.
This error:
[3/4] Linking dependencies... ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ error ENOENT: no such file or directory, open 'C:\Users\keypy\AppData\Local\Yarn\.global\node_modules\abbrev\abbrev.js' at Error (native)# yarn -v v0.15.1 # node -v v4.5.0Reacted by Dave WallaceSame here; Win10x64, node -v
v6.7.0, yarn -vv0.15.1, chokes on.global\node_modules\abbrev\abbrev.js.same here when installing karma global.
yarn global add are-we-there-yet
yarn global v0.15.1
warning No license field
[1/4] Resolving packages...
[2/4] Fetching packages...
warning fsevents@1.0.14: The platform "win32" is incompatible with this module.
info "fsevents@1.0.14" is an optional dependency and failed compatibility check. Excluding it from installation.
warning benchmark@1.0.0: The engine "rhino" appears to be invalid.
[3/4] Linking dependencies...
error ENOENT: no such file or directory, open 'C:\Users\myUsername\AppData\Local\Yarn.global\node_modules\abbrev\abbrev.js'
at Error (native)
info Visit http://yarnpkg.com/en/docs/cli/global for documentation about this command.windows 8.1 enterprise x64
node 4.5.0
npm 2.15.9source: [https://github.com//issues/1073#issuecomment-254158785]
It resolve by modifying the registry:
old value: https://registry.yarnpkg.com
new value (fixed): https://registry.yarnpkg.com//add the double backlashes in registry. (yarn config set registry https://registry.yarnpkg.com//)
@altyne that didn't work got a error 500 on packages and install failed
I can also confirm this issue.
Node 6.9.1
Yarn 0.16.1
Windows Server 2012 R2 (x64)#1600 might be related
Can you reproduce this with
yarn@latest? I'm not able to recreate the issue using the latest Yarnv0.17.10.yarn global add pm2 yarn global v0.17.10 warning No license field [1/4] Resolving packages... [2/4] Fetching packages... warning fsevents@1.0.15: The platform "win32" is incompatible with this module. info "fsevents@1.0.15" is an optional dependency and failed compatibility check. Excluding it from installation. [3/4] Linking dependencies... [4/4] Building fresh packages... [-/3] ⢀ waiting... [2/3] ⠠ fsevents: gyp info using node@6.9.1 | win32 | x64 [-/3] ⠠ waiting... [-/3] ⠠ waiting... error Error running install script for optional dependency: <fsevents truncated> success Installed pm2@2.1.6 with binaries: - pm2 - rundev - pm2-dev - pm2-docker warning No license field Done in 92.80s.
7 remaining items
@yanxyz Same thing happens with gulp-cli , if installed w/ admin rights , any gulp command crashes the terminal in my case
@skhamoud Can confirm same issue. When yarn is installed from the msi installer and global packages are added from admin terminal, the resulting .cmd in C:\Program Files\nodejs for any package crashes the terminal.
The crashing of the terminal is fixed in the pre-release 0.19.0
yeah, it tries to install into
C:\Program Files\nodejsfor me as well by defaultThis should be fixed in 0.24.x
- If you install Yarn via npm, you'll need to manually add %LocalAppData%\Yarn\bin to your path. Sent from my phone. On May 27, 2017 4:13 AM, "W.T. Chang" <notifications@github.com> wrote: Hi, I just installed 0.24.5 by npm. It can install global package now but still not executable. C:\>yarn --version 0.24.5 C:\>yarn global add pm2 yarn global v0.24.5 warning No license field [1/4] Resolving packages... [2/4] Fetching packages... warning fsevents@1.0.17: The platform "win32" is incompatible with this module. info "fsevents@1.0.17" is an optional dependency and failed compatibility check. Excluding it from installation. [3/4] Linking dependencies... ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░[4/4] Building fresh packages... success Installed "pm2@2.4.6" with binaries: - pm2 - rundev - pm2-dev - pm2-docker warning No license field Done in 1.57s. C:\>pm2 -v 'pm2' is not recognized as an internal or external command, operable program or batch file. C:\> — You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub <#859 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AAFnHSnpT3euiIcOkPGn4PgRffHF4Svzks5r9xYygaJpZM4KUo_K> .Reacted by W.T. Chang and Moshe
Installing npm modules globally din't work for me.
I tried installing them in project folder and they worked fine.
config:
windows 10
node.js 4.5.0
npm 2.15.9
run cmd as an administrator and look if the versions are latest and look for errors while running the commandIn my case, my path variable was set at
%LocalAppData%\Yarn\.bin, when the actual folder was%LocalAppData%\Yarn\bin(without the.in front ofbin).After removing the
.everything worked fine again.@lewisl9029 - Which version of Yarn do you have? That should have been fixed in the installer for 0.24.0: 5fc8539
@Daniel15 That makes sense. I installed Yarn quite a while ago so I wouldn't be surprised if I used an installer version prior to 0.24.0. Glad to know it should no longer be a problem for new users!
I have this issue on Linux. I've installed polymer-cli globally, but
polymerisn't in the path.~ yarn global add polymer-cli yarn global v1.3.2 [1/4] Resolving packages... warning polymer-cli > bower@1.8.2: ...psst! Your project can stop working at any moment because its dependencies can change. Prevent this by migrating to Yarn: https://bower.io/blog/2017/how-to-migrate-away-from-bower/ warning polymer-cli > babel-preset-es2015@6.24.1: 🙌 Thanks for using Babel: we recommend using babel-preset-env now: please read babeljs.io/env to update! warning polymer-cli > polyserve > @types/assert@0.0.29: See https://github.com/DefinitelyTyped/DefinitelyTyped/issues/12826 [2/4] Fetching packages... [3/4] Linking dependencies... [4/4] Building fresh packages... success Installed "polymer-cli@1.5.7" with binaries: - polymer Done in 25.08s. ➜ 19:17 polymer zsh: command not found: polymer ➜ 19:17 polymer-cli init zsh: command not found: polymer-cli ➜ 19:17 yarn --version 1.3.2@dandv - This issue is specific to Windows, as it was an issue with the MSI installer. Any Linux issues are unrelated. Please file a separate one.
Do you want to request a feature or report a bug?
bug
What is the current behavior?
unable to install package globally
If the current behavior is a bug, please provide the steps to reproduce.
yarn global add pm2What is the expected behavior?
install package like
npm install -g pm2Please mention your node.js, yarn and operating system version.
Windows 10 x64 Enterprise, version 1607 (build 14393.321)
node js 6.7.0
yarn 0.15.1