shipshapecode / ember-cli-release

Ember CLI addon for versioned release management
MIT License
90 stars 18 forks source link

npm dependency version creates conflict with `np` tool #62

Open bantic opened 7 years ago

bantic commented 7 years ago

I think this issue can safely be closed as "not ember-cli-release's problem" if you are inclined, but I wanted to point it out since it bit me and might bite others. We are using np to create new release tags for an ember addon, and I noticed that np was complaining that the version of npm was incorrect:

npm@3.5.4 has known issues publishing when running Node.js 6. Please upgrade npm or downgrade Node and publish again. https://github.com/npm/npm/issues/5082

That was confusing because I have a newer version of npm (4.1.2) installed, but I eventually realized that because ember-cli-release has a dependency on npm "~3.5.2", that's why np finds npm@3.5.4. I've fixed that problem locally, but I thought it is worth pointing out both that this dependency causes a conflict with np and also that this version range for npm is known to have some publishing bugs (see this very long thread: https://github.com/npm/npm/issues/5082 — in short the buggy npm versions are 3.0.0 to 3.10.0, np checks for that range in its code).

Upgrading the npm dependency would avoid those publishing bugs (which seems like a good thing), and also avoid the conflict with np (which probably matters less — since ember-cli-release does the same thing as np it was my mistake to have them both in my package.json at the same time).

lvl99 commented 7 years ago

I'm trying to install an ember addon and it keeps using this npm version instead of my computer's version, so it keeps crashing with:

npm ERR! node v7.10.0
npm ERR! npm  v3.5.4 # I'm using 4.2
npm ERR! code MODULE_NOT_FOUND

npm ERR! Cannot find module 'internal/fs'

@slindberg Is there any reason why an older version of NPM is installed? Perhaps the npm dependency should be a dev dependency too.

mirague commented 7 years ago

@lvl99 After an hour or so of chasing the MODULE_NOT_FOUND error I've also came to the conclusion it's due to this package. Wish they wouldn't pin the npm version down like this.