`npm run build` fails if webpack isn't globally installed
See original GitHub issueFirst, 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/config.prod.withjs.babel.js && 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.
Thanks.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:2
- Comments:5 (1 by maintainers)
Top 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 >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
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!
Great. Thanks.