خطای npm run dev

98

ubuntu 20

reza@reza-VivoBook:/var/www/html/test1$ npm run development -- --watch

 

> @ development /var/www/html/test1

> mix "--watch"

 

error: unknown option '--watch'

npm ERR! code ELIFECYCLE

npm ERR! errno 1

npm ERR! @ development: `mix "--watch"`

npm ERR! Exit status 1

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/reza/.npm/_logs/2021-02-25T08_41_07_567Z-debug.log

reza@reza-VivoBook:/var/www/html/test1$ npm run development

 

> @ development /var/www/html/test1

> mix

 

Error: You are using an unsupported version of Node. Please update to at least Node v12.14

at assertSupportedNodeVersion (/var/www/html/test1/node_modules/laravel-mix/src/Engine.js:6:15)

at executeScript (/var/www/html/test1/node_modules/laravel-mix/bin/cli.js:61:5)

at Command.program.command.description.option.action.cmd (/var/www/html/test1/node_modules/laravel-mix/bin/cli.js:47:13)

at Command.listener [as _actionHandler] (/var/www/html/test1/node_modules/commander/index.js:426:31)

at Command._parseCommand (/var/www/html/test1/node_modules/commander/index.js:1002:14)

at Command._dispatchSubcommand (/var/www/html/test1/node_modules/commander/index.js:953:18)

at Command._parseCommand (/var/www/html/test1/node_modules/commander/index.js:979:12)

at Command.parse (/var/www/html/test1/node_modules/commander/index.js:801:10)

at Command.parseAsync (/var/www/html/test1/node_modules/commander/index.js:828:10)

at run (/var/www/html/test1/node_modules/laravel-mix/bin/cli.js:50:19)

npm ERR! code ELIFECYCLE

npm ERR! errno 1

npm ERR! @ development: `mix`

npm ERR! Exit status 1

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/reza/.npm/_logs/2021-02-25T08_41_12_948Z-debug.log

 

 

محتویات فایل لاگ:

reza@reza-VivoBook:/var/www/html/test1$ node -v

v10.19.0

 

ورژن ۱۰ بود

 

ورژن node رو به ۱۵ افزایش می دهیم

 

# Using Ubuntu
curl -fsSL https://deb.nodesource.com/setup_15.x | sudo -E bash -
sudo apt-get install -y nodejs

 

 

منبع:

https://github.com/nodesource/distributions/blob/master/README.md




از مجموع 1 رأی