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

Compatibility with npm v3.0.0: Cannot find module #462

Closed
shirish87 opened this Issue Jun 27, 2015 · 6 comments

Comments

Projects
None yet
5 participants
@shirish87

shirish87 commented Jun 27, 2015

Low priority since npm@3 is still in beta.

Code in middleware.js attempts to reuse the send module from the connect module. But because the new version of npm now has a flat structure for modules, relative paths referencing node_modules fail.

npm is now smart enough to handle duplicate dependencies, so we should just include send as a dependency and it'll dedup.

$ harp init react-dashboard
module.js:338
    throw err;
          ^
Error: Cannot find module '../node_modules/connect/node_modules/send'
  at Function.Module._resolveFilename (module.js:336:15)
  at Function.Module._load (module.js:278:25)
  at Module.require (module.js:365:17)
  at require (module.js:384:17)
  at Object.<anonymous> (/home/shirish/.nvm/v0.12.4/lib/node_modules/harp/lib/middleware.js:10:12)
  at Module._compile (module.js:460:26)
  at Object.Module._extensions..js (module.js:478:10)
  at Module.load (module.js:355:32)
  at Function.Module._load (module.js:310:12)
  at Module.require (module.js:365:17)
  at require (module.js:384:17)
  at Object.<anonymous> (/home/shirish/.nvm/v0.12.4/lib/node_modules/harp/lib/index.js:8:19)
  at Module._compile (module.js:460:26)
  at Object.Module._extensions..js (module.js:478:10)
  at Module.load (module.js:355:32)
  at Function.Module._load (module.js:310:12)
  at Module.require (module.js:365:17)
  at require (module.js:384:17)
  at Object.<anonymous> (/home/shirish/.nvm/v0.12.4/lib/node_modules/harp/bin/harp:9:21)
  at Module._compile (module.js:460:26)
  at Object.Module._extensions..js (module.js:478:10)
  at Module.load (module.js:355:32)
  at Function.Module._load (module.js:310:12)
  at Function.Module.runMain (module.js:501:10)
  at startup (node.js:129:16)
  at node.js:814:3
@othiym23

This comment has been minimized.

Show comment
Hide comment
@othiym23

othiym23 Sep 18, 2015

npm@3 is no longer in beta. :D

Leaving this note here because npm's own documentation site relies on harp and it can't be used with the current stable version of npm, which seems at least mildly problematic. Is there a downside of having harp depend directly on send?

othiym23 commented Sep 18, 2015

npm@3 is no longer in beta. :D

Leaving this note here because npm's own documentation site relies on harp and it can't be used with the current stable version of npm, which seems at least mildly problematic. Is there a downside of having harp depend directly on send?

@kennethormandy

This comment has been minimized.

Show comment
Hide comment
@kennethormandy

kennethormandy Sep 18, 2015

Collaborator

Hey @othiym23! Congrats on the launch. I actually just updated Connect and fixed this yesterday on the release-v0.18.1 branch, we should be tagging a new release of Harp tomorrow—all tests are passing on Node v4.1.0 and npm@3.3.3.

Collaborator

kennethormandy commented Sep 18, 2015

Hey @othiym23! Congrats on the launch. I actually just updated Connect and fixed this yesterday on the release-v0.18.1 branch, we should be tagging a new release of Harp tomorrow—all tests are passing on Node v4.1.0 and npm@3.3.3.

@sintaxi

This comment has been minimized.

Show comment
Hide comment
@sintaxi

sintaxi Sep 18, 2015

Owner

Resolved! Thanks @othiym23. Great work on getting npm 3 launched.

Owner

sintaxi commented Sep 18, 2015

Resolved! Thanks @othiym23. Great work on getting npm 3 launched.

@sintaxi sintaxi closed this Sep 18, 2015

@benburton

This comment has been minimized.

Show comment
Hide comment
@benburton

benburton Dec 2, 2015

Hey @othiym23! Congrats on the launch. I actually just updated Connect and fixed this yesterday on the release-v0.18.1 branch, we should be tagging a new release of Harp tomorrow—all tests are passing on Node v4.1.0 and npm@3.3.3

Any chance that new release will be cut soon?

benburton commented Dec 2, 2015

Hey @othiym23! Congrats on the launch. I actually just updated Connect and fixed this yesterday on the release-v0.18.1 branch, we should be tagging a new release of Harp tomorrow—all tests are passing on Node v4.1.0 and npm@3.3.3

Any chance that new release will be cut soon?

@kennethormandy

This comment has been minimized.

Show comment
Hide comment
@kennethormandy

kennethormandy Dec 2, 2015

Collaborator

@benburton Hey, we’ve published a couple of version since then. The latest is v0.20.x, which works with Node v5 and npm@3.

Collaborator

kennethormandy commented Dec 2, 2015

@benburton Hey, we’ve published a couple of version since then. The latest is v0.20.x, which works with Node v5 and npm@3.

@benburton

This comment has been minimized.

Show comment
Hide comment
@benburton

benburton commented Dec 2, 2015

Thanks @kennethormandy!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment