N
N
Nightmare0582021-01-26 14:52:25
npm
Nightmare058, 2021-01-26 14:52:25

Why doesn't npm run dev/watch run?

Good afternoon.
I installed a new Ubuntu system, started creating a new Laravel project. After installing VueJS I tried to run npm run dev but the terminal gave me an error. Does anyone know how to solve this?

/var/www/shop$ npm install && npm run dev
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected] : wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] .13 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]:

audited 1193 packages in 4.238s

92 packages are looking for funding
run `npm fund` for details

found 1 high severity vulnerability
run `npm audit fix` to fix them, or `npm audit` for details

> @ dev /var/www/shop
> npm run development

> @ development /var/www/shop
> mix

[webpack-cli] /var/www/shop/node_modules/laravel-mix/src/Mix.js:18
static _primary = null;
^

SyntaxError: Unexpected token =
at new Script (vm.js:83:7)
at NativeCompileCache._moduleCompile(/var/www/shop/node_modules/v8-compile-cache/v8-compile-cache.js:240:18)
at Module._compile (/var/www/shop/node_modules/v8-compile-cache/v8-compile-cache.js:184:36)
at Object.Module._extensions..js (internal/modules/cjs/loader. js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal /modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (/var/www/shop/node_modules/v8-compile-cache/ v8-compile-cache.js:159:20)
at module.exports (/var/www/shop/node_modules/laravel-mix/setup/webpack.config.js:2:17)
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! @development: `mix`
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! /home/work/.npm/_logs/2021-01-26T11_37_02_079Z-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! /home/work/.npm/_logs/2021-01-26T11_37_02_088Z-debug.log

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Michael, 2021-01-26
@Nightmare058

update node https://github.com/laravel/framework/issues/35830#...
and learn to google

E
Evgeny Bukharev, 2017-06-26
@hollanditkzn

public function scenarios()
    {
        return [
            self::DECLINED => ['declined'],
        ];
    }
public function rules()
    {
        return [
             ['declined','required','on'=>self::DECLINED],
        ];
    }

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question