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.

`npm run build` fails if webpack isn't globally installed

See original GitHub issue

First, great tool! Thanks for your hard work on this!

I’m able to run the tool and start a node server with the example documentation, but I want to get the static files for my documentation.

Following the directions in the readme. I ran npm run build, but it fails…

npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     npm run clean && NODE_ENV=production webpack --config webpack/ && rm build/static-*

I then installed webpack globally. I had to then clean the project, re-init, install, and then the command worked.

It would be good to add to the documentation that webpack is required to be globally installed, or if possible, make that not a requirement.


Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:2
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

Relequestualcommented, Jan 20, 2017

I discovered, npm run build works if you do npm install first. I’ll doubbly confirm this next week as I re-tweak my npm doc generation pipeline!

Relequestualcommented, May 9, 2017

Great. Thanks.

Read more comments on GitHub >

github_iconTop Results From Across the Web

npm run build failing - node.js - Stack Overflow
I have tried to clear the cache of node_modules, remove package-lock.json, re install with npm and re-build, but nothing works.
Read more >
Webpack - npm
Webpack is a module bundler. Its main purpose is to bundle JavaScript files for usage in a browser, yet it is also capable...
Read more >
Development | webpack
If an error originates from b.js , the source map will tell you exactly that. ... Run an npm run build , it...
Read more >
Why isn't the npm link command working? | Benjamin W Fox
global node_modules: the folder where symlinks are created when running npm link , or where packages are added with npm install -g <package>...
Read more >
Error trying to run "npm run prod" from within a shell script
You can try and remove the node_modules folder using rm -rf node_modules and let the script install all ...
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 Post

No results found

github_iconTop Related Hashnode Post

No results found