next-update icon indicating copy to clipboard operation
next-update copied to clipboard

"Current installation is invalid, please run NPM install first" because of bower component

Open naholyr opened this issue 10 years ago • 6 comments

We put bower dependencies in a specific folder, using .bowerrc. We installed Angular as a Bower dependency, and when I run next-update I get:

next-update - Tests if module's dependencies can be updated to latest version
  version: 0.5.1
  author: {"name":"Gleb Bahmutov","email":"[email protected]"}
checking if the current state works
ERROR: cannot find folder /home/nchambrier/Projects/LMTM/ooz/bower_components/angular
ERROR testing next working updates
Error: Current installation is invalid, please run NPM install first
    at /home/nchambrier/.nvm/v0.10.32/lib/node_modules/next-update/src/next-update.js:35:26
    at node.js:906:3
From previous event:
    at checkDependenciesInstalled (/home/nchambrier/.nvm/v0.10.32/lib/node_modules/next-update/src/next-update.js:29:19)
    at Object.checkCurrentInstall (/home/nchambrier/.nvm/v0.10.32/lib/node_modules/next-update/src/next-update.js:43:12)
    at Object.<anonymous> (/home/nchambrier/.nvm/v0.10.32/lib/node_modules/next-update/index.js:129:38)

Obviously, if it looks for Angular in ./bower_components it won't be found as there is no such folder.

next-update should either

  • ignore bower dependencies (I thought it only checked npm dependencies)
  • read .bowerrc

naholyr avatar Dec 12 '14 14:12 naholyr

Will get to this sometime, or mind implementing this as a pull request?

bahmutov avatar Dec 21 '14 19:12 bahmutov

I would gladly get into it, but I'm not sure what the good fix is: ignore bower.json or not ignore bowerrc?

naholyr avatar Dec 22 '14 09:12 naholyr

get the same error

iamstarkov avatar Apr 15 '15 17:04 iamstarkov

is it okay to handle bower registry with this tool? if new ones will appear in future? It will be hard to maintain, won’t it?

iamstarkov avatar Apr 15 '15 17:04 iamstarkov

I think it is fine to use this tool for bower dependency, I guess in this case it should really read .bowerrc I will try fixing this over the weekend

bahmutov avatar Apr 15 '15 17:04 bahmutov

Actually, I found very confusing that error suggest only npm i even If I forgot only bower deps. It’s a bit complicated for me to separate forgotten npm deps from case of forgotten bower ones. But it’s pretty easy to add suggestion about bower deps in that error message and it will be good enough, I think. If you are think the same, I created #51 about it. Feel free to ask any question there.

iamstarkov avatar Apr 15 '15 17:04 iamstarkov