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-upgrade-all' is not recognized as an internal or external command #1

Closed
Deilan opened this issue Jul 27, 2017 · 6 comments
Closed

Comments

@Deilan
Copy link

Deilan commented Jul 27, 2017

Trying to use after install:

'yarn-upgrade-all' is not recognized as an internal or external command, operable program or batch file.

@tylerlong
Copy link
Owner

Install it globally: yarn global add yarn-upgrade-all.

If you install it locally, you need to ./node_modules/.bin/yarn-upgrade-all.

@Deilan
Copy link
Author

Deilan commented Aug 7, 2017

@tylerlong I did install it globally. It doesn't work after that.

image

@tylerlong tylerlong reopened this Aug 7, 2017
@tylerlong
Copy link
Owner

tylerlong commented Aug 7, 2017

@Deilan I don't use Windows and I didn't test it on windows.

I guess you will have issues with all node command line libraries, not only yarn-upgrade-all.

Please read this thread: https://stackoverflow.com/questions/9587665/nodejs-cannot-find-installed-module-on-windows

Let me know if it works.

@Deilan
Copy link
Author

Deilan commented Aug 7, 2017

@tylerlong Nope, I don't have any problems with any of popular and ubiquitous npm modules globally installed on Windows. Moreover, I didn't have to make any additional actions upon installing them to make them work right after install. grunt, gulp, yarn, tsc, tslint are just some of them and they work quite well.

@tylerlong
Copy link
Owner

tylerlong commented Aug 8, 2017

I am not sure I have fixed the issue but I've released a new version. Could you please have a try?

Here is the change: 9f03841

I think changing

"bin": "index.js"

to

"bin": {
  "yarn-upgrade-all": "./index.js"
},

might fix the issue.

@tylerlong
Copy link
Owner

tylerlong commented Aug 8, 2017

I just tried and it worked:

PS C:\Users\tyler\AppData\Local\Yarn\bin> npm install -g yarn-upgrade-all
C:\Users\tyler\AppData\Local\scoop\apps\nodejs\6.7.0\nodejs\yarn-upgrade-all -> C:\Users\tyler\AppData\Local\scoop\apps\nodejs\6.7.0\nodejs\node_modules\yarn-upgrade-all\index.js
C:\Users\tyler\AppData\Local\scoop\apps\nodejs\6.7.0\nodejs
`-- [email protected]
  `-- [email protected]
    +-- [email protected]
    | `-- [email protected]
    |   `-- [email protected]
    +-- [email protected]
    `-- [email protected]
      `-- [email protected]

PS C:\Users\tyler\AppData\Local\Yarn\bin> yarn-upgrade-all.cmd
Error: Cannot find package.json file in the current directory
PS C:\Users\tyler\AppData\Local\Yarn\bin>

However yarn global add ... won't work which I believe is yarn's bug. There is an open issue: yarnpkg/yarn#2224

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

2 participants