Skip to content

Can not run globally installed packages which are installed with yarn #2224

@sharikovvladislav

Description

@sharikovvladislav

Do you want to request a feature or report a bug?

Bug

What is the current behavior?
I can not run globally installed packages (uglifyjs, eslint etc).

Looks like there are problems with path. When I run (you full steps can see below) commands I get errors about path is incorrect. Path is: /d/Dev/nodejs/C:/Users/Vlad/AppData/Local/Yarn/config/global/node_modules/.bin/uglifyjs.
It is not problem with uglifyjs. If I will install eslint globally or something like that I am getting same behaviour.

I am trying to do this in Git Bash terminal (MINGW64). If I try to run same command in cmd, cmd window is just disappearing. I also tried to create .cmd file and run commands from this file via: cmdFileName >> xx.txt. I got this in output:

c:\Users\Vlad>eslint --help 
c:\Users\Vlad>"$basedir/C:/Users/Vlad/AppData/Local/Yarn/config/global/node_modules/.bin/eslint.cmd"   "$@" 
c:\Users\Vlad>exit $? 

If the current behavior is a bug, please provide the steps to reproduce.

  1. Install yarn with windows installer.
  2. Install uglify-js (or anything else) globally (from npm):
    Output is:
Vlad@VladPC MINGW64 /
$ yarn global add uglify-js
yarn global v0.17.10
warning No license field
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Installed [email protected] with binaries:
      - uglifyjs
warning No license field
Done in 1.71s.
  1. Use installed package
Vlad@VladPC MINGW64 /
$ uglifyjs
/bin/sh: /d/Dev/nodejs/C:/Users/Vlad/AppData/Local/Yarn/config/global/node_modules/.bin/uglifyjs: No such file or directory

What is the expected behavior?

I expect that I can run uglifyjs (or eslint or any other pacakges) command without errors after it.

Please mention your node.js, yarn and operating system version.

NodeJS v 7.0.0
Yarn v v0.17.10
OS v Windows 7 Ultimate x64

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions