theintern / intern

A next-generation code testing stack for JavaScript.
https://theintern.io/
Other
4.36k stars 310 forks source link

@next not installing for Node 4.x.x #808

Closed thegecko closed 7 years ago

thegecko commented 7 years ago

Expected behavior

As described in the README and in the intern tutorial README, intern@next should work with node 4.x.x

Current behavior

It fails to install with this error:

npm ERR! node v4.8.3
npm ERR! npm  v2.15.11
npm ERR! code EPEERINVALID

npm ERR! peerinvalid The package @dojo/has@2.0.0-beta2.3 does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer @dojo/core@2.0.0-beta2.4 wants @dojo/has@beta2
npm ERR! peerinvalid Peer @dojo/shim@2.0.0-beta2.4 wants @dojo/has@beta2

Possible solution

This may be an issue with mis-matched versions running up to release and the usage of next in the dojo2 libraries: https://github.com/dojo/core/blob/master/package.json#L24

Using explicit versions, may fix this, but it's not clear why it's only an issue in Node 4.x.x. Could be that @next resolves differently between npm versions?

Steps to reproduce (for bugs)

  1. nvm use 4
  2. follow the intern-tutorial instructions

Environment

Intern version: @next Node version: v4.8.3 NPM version: v2.15.11 Browser version: N/A

Additional information

Project is looking awesome!

jason0x43 commented 7 years ago

While Intern does support Node 4, it actually needs npm 3+ to properly install all of its dependencies. The error you're seeing is specifically due to an incompatibility between how Dojo 2 beta packages reference each other and npm 2.

jason0x43 commented 7 years ago

That should definitely be noted in the compatibility info, though, so thanks for pointing that out!

thegecko commented 7 years ago

Are there plans to support the default npm shipped with node 4? 2.x I assume.

jason0x43 commented 7 years ago

Not directly. The issue is with how Dojo, one of Intern's core dependencies, manages its beta versions (https://github.com/dojo/meta/issues/204), so the problematic behavior isn't under Intern's control. The issue should be resolved when Dojo starts using actual version numbers for its dependencies, either with the next beta or the final release. Dojo does state npm 3+ as a requirement, though, so there is no guarantee that it will work properly with npm 2 even then.

For what it's worth, npm is separate from Node, so it's simple (and recommended by the npm maintainers) to update it.

thegecko commented 7 years ago

Ack, it simply makes it more difficult to explain requirements to our customers 😀

dylans commented 7 years ago

@thegecko let me know if this is a big problem and I'll see what we can do prior to Dojo 2 being released.

thegecko commented 7 years ago

Thanks Dylan. It simply means our test system is using a newer version of npm than is shipped with the node version we support. It makes me marginally nervous that we support a setup not directly tested :)