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.

Fresh install: npm run dev & npm run production fail. npm run watch works

See original GitHub issue

Any idea on why this is happening on a clean install? All dependencies are up to date.

ERROR  Failed to compile with 5 errors

These dependencies were not found in node_modules:

* ../fonts/bootstrap/glyphicons-halflings-regular.eot
* ../fonts/bootstrap/glyphicons-halflings-regular.woff2
* ../fonts/bootstrap/glyphicons-halflings-regular.woff
* ../fonts/bootstrap/glyphicons-halflings-regular.ttf
* ../fonts/bootstrap/glyphicons-halflings-regular.svg

Did you forget to run npm install --save for them?
            Asset      Size  Chunks                    Chunk Names
       /js/app.js    288 kB       0  [emitted]  [big]  /js/app
mix-manifest.json  32 bytes          [emitted]         

npm ERR! Darwin 16.4.0
npm ERR! argv "/usr/local/Cellar/node/7.5.0/bin/node" "/usr/local/bin/npm" "run" "production"
npm ERR! node v7.5.0
npm ERR! npm  v4.2.0
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! @ production: `node node_modules/cross-env/bin/cross-env.js NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js`
npm ERR! Exit status 2
npm ERR! 
npm ERR! Failed at the @ production script 'node node_modules/cross-env/bin/cross-env.js NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the  package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node node_modules/cross-env/bin/cross-env.js NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs 
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls 
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/dave/.npm/_logs/2017-02-03T04_57_25_004Z-debug.log

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:10 (2 by maintainers)

github_iconTop GitHub Comments

18reactions
mirrcommented, Feb 3, 2017

I was able to resolve this after reading https://www.npmjs.com/package/bootstrap-sass. It appears bootstrap-sprockets is required. So, here’s what’s inside in my app.scss.

// Fonts @import url(https://fonts.googleapis.com/css?family=Raleway:300,400,600);

// Variables @import "variables";

// Bootstrap @import "node_modules/bootstrap-sass/assets/stylesheets/bootstrap-sprockets"; @import "node_modules/bootstrap-sass/assets/stylesheets/bootstrap";

8reactions
dawiyocommented, Feb 3, 2017

I commented out @import "node_modules/bootstrap-sass/assets/stylesheets/bootstrap"; in resources/assets/sass/app.scss and the errors have stopped. Must be an issue with their package.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Fresh install: npm run dev & npm run production fail. ...
Any idea on why this is happening on a clean install? All dependencies are up to date. ERROR Failed to compile with 5...
Read more >
Laravel 8 Installation - npm run dev Error
To fix this issue you need to replace this code. mix.react('resources/js/app.js', 'public/js') .sass('resources/sass/app.scss', 'public/css');.
Read more >
npm run watch error, not working in laravel
Hi i'm using laravel 5.4, when i run npm run watch or npm run dev , this give me error > @ watch...
Read more >
npm-run-script
Description. This runs an arbitrary command from a package's "scripts" object. If no "command" is provided, it will list the available scripts.
Read more >
How To Fix “Laravel Mix NPM run dev error” - YouTube
This video will help you to solve the annoying “Laravel Mix NPM run dev error ” that you probably have seen before when...
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