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

Cannot find module 'hpack.js' #51

Open
itsmoops opened this issue Aug 9, 2017 · 4 comments
Open

Cannot find module 'hpack.js' #51

itsmoops opened this issue Aug 9, 2017 · 4 comments

Comments

@itsmoops
Copy link

itsmoops commented Aug 9, 2017

Hey there, my team just started a new project using the latest version of webpack-dev-server (2.7.1), and when starting up the server we are all consistently seeing the following error.

Error: Cannot find module 'hpack.js'
    at Function.Module._resolveFilename (module.js:440:15)
    at Function.Module._load (module.js:388:25)
    at Module.require (module.js:468:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/Users/a6001382/analytics/analytics-q/node_modules/spdy-transport/lib/spdy-transport/protocol/http2/hpack-pool.js:5:13)

The issue is still persisting even after attempting to install hpack.js as a globally available dependency. Is there a way to resolve this?

@ballPointPenguin
Copy link

seeing the same, starting today

@itsmoops
Copy link
Author

Hey @ballPointPenguin - I was able to resolve this issue. I found out that this wasn't exactly an issue with the package itself. Try running npm i -g npm@latest-4 and try installing again. Evidently some versions of NPM don't correctly set the "main" field of package.json if the package contains a period like hpack.js.

@ballPointPenguin
Copy link

aha. Thank you @itsmoops

@Nolanus
Copy link

Nolanus commented Oct 24, 2017

Updating npm did not solve the problem for me. I had to manually go into node_modules/spdy-transport and run npm install in there (as pointed out here).

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

No branches or pull requests

3 participants