Can't resolve '../package' in 'node_modules/pusher/lib'
See original GitHub issueversion.js is failing to resolve the version because ../package
is not found. Changing this to:
module.exports = require('../package.json').version;
resolves the issue.
Node version: v6.1.0
Npm version: 3.8.6
Issue Analytics
- State:
- Created 6 years ago
- Reactions:8
- Comments:9 (4 by maintainers)
Top Results From Across the Web
Module not found: Error: Can't resolve 'crypto' - Stack Overflow
I ran into a similar issue lately while trying to use another library (tiff.js) in a small project I was experimenting with.
Read more >pusher-js - npm
Pusher Channels JavaScript library for browsers, React Native, NodeJS and web workers. Latest version: 8.0.0, last published: 10 days ago.
Read more >cannot find module [Node npm Error Solved] - freeCodeCamp
To fix the error, you need to install the package that is absent in your project directory – npm install package-name or yarn...
Read more >use 'stats.errordetails: true' resp. '--stats-error-details' to ... - You.com
There is an open bug report for this on the pusher-js library. ... src/public/index.ts 35:17-38 Module not found: Error: Can't resolve './maybe.js' in...
Read more >[Solution] Error: Cannot Find Module "nodemailer" - Courier
This error occurs when you have not installed the nodemailer library in your Node.js application. Solution - Here's How To Resolve It. First,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@dmonay So interestingly enough, I was just getting back to this and tried something different, which happened to work. I couldn’t figure out why this worked perfectly before we introduced Webpack, but did not work afterward, so I looked at out Webpack config:
I don’t pretend to understand exactly how Webpack works, but adding
.json
to the above array fixed it. Maybe this will help someone else should they stumble upon this issue.Thanks for the reply!
So it looks like maybe I broke this 3.5 years ago in this PR: https://github.com/pusher/pusher-http-node/pull/51
Wherein @topliceanu said “I don’t think you need the .json extension”, I agreed, but it seems we were probably wrong …