jbowman99's avatar

Having some issues running npm run dev, i have the updated package.json file as @TaylorOtwell suggested, removed node_modules and ran npm install --no-bin-links. when i run npm run dev it produces this error:

> npm run development


> @ development /home/vagrant/Code/forum
> cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js

sh: 1: cross-env: not found
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! @ development: `cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the @ development 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/vagrant/.npm/_logs/2017-06-30T15_36_36_192Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ dev: `npm run development`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ dev 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/vagrant/.npm/_logs/2017-06-30T15_36_36_215Z-debug.log

AngryALF's avatar

have err when try npm run dev:


bash-3.2$ npm run dev

> @ dev /Users/angryalf/www/cstore
> npm run development


> @ development /Users/angryalf/www/cstore
> cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js

 95% emitting                                                                        

 ERROR  Failed to compile with 2 errors                                                                                             13:10:14

 error  in ./resources/assets/sass/app.scss

Module build failed: 
if (typeof jQuery === 'undefined') {
  ^
      Invalid CSS after "if": expected "{", was "(typeof jQuery === "
      in /Users/angryalf/www/cstore/node_modules/bootstrap/dist/js/bootstrap.js (line 7, column 4)

 @ ./resources/assets/sass/app.scss 4:14-253
 @ multi ./resources/assets/js/app.js ./resources/assets/sass/app.scss

 error  in ./resources/assets/sass/app.scss

Module build failed: ModuleBuildError: Module build failed: 
if (typeof jQuery === 'undefined') {
  ^
      Invalid CSS after "if": expected "{", was "(typeof jQuery === "
      in /Users/angryalf/www/cstore/node_modules/bootstrap/dist/js/bootstrap.js (line 7, column 4)
    at runLoaders (/Users/angryalf/www/cstore/node_modules/webpack/lib/NormalModule.js:192:19)
    at /Users/angryalf/www/cstore/node_modules/loader-runner/lib/LoaderRunner.js:364:11
    at /Users/angryalf/www/cstore/node_modules/loader-runner/lib/LoaderRunner.js:230:18
    at context.callback (/Users/angryalf/www/cstore/node_modules/loader-runner/lib/LoaderRunner.js:111:13)
    at Object.asyncSassJobQueue.push [as callback] (/Users/angryalf/www/cstore/node_modules/sass-loader/lib/loader.js:55:13)
    at Object.<anonymous> (/Users/angryalf/www/cstore/node_modules/sass-loader/node_modules/async/dist/async.js:2244:31)
    at Object.callback (/Users/angryalf/www/cstore/node_modules/sass-loader/node_modules/async/dist/async.js:906:16)
    at options.error (/Users/angryalf/www/cstore/node_modules/node-sass/lib/index.js:294:32)

            Asset      Size  Chunks                    Chunk Names
       /js/app.js   1.28 MB       0  [emitted]  [big]  /js/app
mix-manifest.json  32 bytes          [emitted]         
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! @ development: `cross-env NODE_ENV=development 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 @ development 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!     /Users/angryalf/.npm/_logs/2017-07-19T10_10_15_269Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! @ dev: `npm run development`
npm ERR! Exit status 2
npm ERR! 
npm ERR! Failed at the @ dev 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!     /Users/angryalf/.npm/_logs/2017-07-19T10_10_15_290Z-debug.log

NexusPlex's avatar

Guys if you are using homestead or virtual machine I ssh to the machine and run the commands inside npm install then npm run dev that works for me!

AlexanderZP's avatar

@JeffreyWay Man you saved my life really. I tried your way, but just npm install cross-env then tried npm install and it worked. Thank you so much

Previous

Please or to participate in this conversation.