Error: Cannot find module './dist/index.js'
See original GitHub issueSince the merge of https://github.com/PrismarineJS/node-minecraft-protocol/pull/115, require('minecraft-protocol')
fails for me with:
> require('minecraft-protocol')
Error: Cannot find module './dist/index.js'
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> (node-minecraft-protocol/index.js:1:80)
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)
I ran npm install
in the node-minecraft-protocol directory but it only outputs a few warnings, no errors:
node-minecraft-protocol $ npm install
npm WARN package.json batch@0.3.2 No repository field.
npm WARN package.json ansi-color@0.2.1 'repositories' (plural) Not supported. Please pick one as the 'repository' field
if I revert 439c240247faedbbde46849d6be9a3f8721e3b6a, then the require() succeeds.
I am not familiar with server-side build processes but best I can tell this has to do with gulp, which seems to be supposed to generate ./dist/index.js. If so should a shell command to invoke gulp be added to the package.json install script or what?
Issue Analytics
- State:
- Created 9 years ago
- Comments:10 (10 by maintainers)
Top Results From Across the Web
How do I resolve "Cannot find module" error using Node.js?
This happens when a first npm install has crashed for some reason (SIGINT of npm), or that the delay was too long, or...
Read more >"Cannot find module" when main file not index.js with ... - GitHub
The solution is to upgrade to Node.js v16.4.0 or later, or wait for v14.17.4 once it is released next week. I'll try to...
Read more >Cannot find module 'X' error in Node.js | bobbyhadz
To solve the "Cannot find module" error in Node.js, make sure to install the package from the error message if it's a third-party...
Read more >Error: Cannot find module - Render community
Hello community, I have a problem with my first deployment of the express application in render.com, the console shows an error Error: The ......
Read more >cannot find module [Node npm Error Solved] - freeCodeCamp
How to Fix the "cannot find module" Error · delete the node modules folder by running rm -rf node_modules · delete package.lock.json file...
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
Thanks, if I run
npm install -g gulp && gulp
then it does create the compileddist
files as expected.Could this step be documented somewhere? (not obvious for someone who hasn’t ever used gulp)
0.13.2 works great, thanks! I’m fine with closing this (unless you want to keep it open for https://github.com/npm/npm/pull/7627, but I’m at least no longer hitting it in my normal workflow using
npm link
)