question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"Error: Module not found"

See original GitHub issue

Attempting to install and run according to the instructions at https://github.com/cracker0dks/whiteboard#without-docker on Ubuntu 18.04.

$ node -v
v12.18.0

Complete error dump running npm ci && npm run start:prod:

WARNING in ./node_modules/pdfjs-dist/webpack.js
Module not found: Error: Can't resolve 'worker-loader' in '/var/www/html/whiteboard/node_modules/pdfjs-dist'
 @ ./node_modules/pdfjs-dist/webpack.js
 @ ./src/js/main.js
 @ ./src/js/index.js
 @ multi ./src/js/index.js

ERROR in ./node_modules/pdfjs-dist/webpack.js
Module not found: Error: Can't resolve 'worker-loader' in '/var/www/html/whiteboard/node_modules/pdfjs-dist'
 @ ./node_modules/pdfjs-dist/webpack.js 27:18-64
 @ ./src/js/main.js
 @ ./src/js/index.js
 @ multi ./src/js/index.js
Child HtmlWebpackCompiler:
     1 asset
    Entrypoint HtmlWebpackPlugin_0 = __child-HtmlWebpackPlugin_0
    [0] ./node_modules/html-webpack-plugin/lib/loader.js!./src/index.html 11.5 KiB {0} [built]
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! whiteboard@1.0.0 build: `webpack --config config/webpack.build.js`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the whiteboard@1.0.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/user1/.npm/_logs/2020-07-01T16_54_06_763Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! whiteboard@1.0.0 start:prod: `npm run build && node scripts/server.js --mode=production`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the whiteboard@1.0.0 start:prod script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/user1/.npm/_logs/2020-07-01T16_54_06_805Z-debug.log

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
yrammoscommented, Jul 3, 2020

@cracker0dks @FloChehab problem was due to irrelevant local misconfiguration, apologies for the false alarm. Closing.

0reactions
cracker0dkscommented, Jul 3, 2020

no problem. Glad you found it 👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

ModuleNotFoundError: no module named Python Error [Fixed]
How to fix the ModuleNotFoundError in Python · 1. Make sure imported modules are installed · 2. Make sure modules are spelled correctly...
Read more >
module-not-found - Next.js
Why This Error Occurred · The module you're trying to import is not installed in your dependencies · The module you're trying to...
Read more >
webpack: Module not found: Error: Can't resolve (with relative ...
Your file structure says that folder name is Container with a capital C. But you are trying to import it by container with...
Read more >
Have a JavaScript Module Not Found Error ... - Airbrake Blog
Most likely, the reason you're seeing a “module not found” error message within your JavaScript code will be something simple, like putting an ......
Read more >
Error [ERR_MODULE_NOT_FOUND]: Cannot find module in JS
The "Error [ERR_MODULE_NOT_FOUND]: Cannot find module" occurs when you set the type attribute to module in your package.json file, but omit the file...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found