在npm run watch

时间:2019-07-19 13:44:08

标签: laravel vue.js npm

我取消了 npm 并再次运行它,但出现此错误:

  

@ 1.2.0开发/ Applications / XAMPP / xamppfiles / htdocs / clinic   cross-env NODE_ENV =开发node_modules / webpack / bin / webpack.js --no-progress --hide-modules --config = node_modules / laravel-mix / setup / webpack.config.js“ --watch”

我删除了 npm 和package.json并再次安装,但没有任何变化

/Applications/XAMPP/xamppfiles/htdocs/clinic/node_modules/webpack-cli/bin/cli.js:93
                                throw err;
                                ^

TypeError: Cannot read property 'options' of undefined
    at Object.mix.extend.arguments_ (/Applications/XAMPP/xamppfiles/htdocs/clinic/webpack.mix.js:54:64)
    at Object.webpackConfig (/Applications/XAMPP/xamppfiles/htdocs/clinic/node_modules/laravel-mix/src/components/Extend.js:25:27)
    at Mix.listen.config (/Applications/XAMPP/xamppfiles/htdocs/clinic/node_modules/laravel-mix/src/components/ComponentFactory.js:75:54)
    at events.(anonymous function).forEach.handler (/Applications/XAMPP/xamppfiles/htdocs/clinic/node_modules/laravel-mix/src/Dispatcher.js:34:47)
    at Array.forEach (<anonymous>)
    at Dispatcher.fire (/Applications/XAMPP/xamppfiles/htdocs/clinic/node_modules/laravel-mix/src/Dispatcher.js:34:28)
    at Mix.dispatch (/Applications/XAMPP/xamppfiles/htdocs/clinic/node_modules/laravel-mix/src/Mix.js:119:25)
    at WebpackConfig.build (/Applications/XAMPP/xamppfiles/htdocs/clinic/node_modules/laravel-mix/src/builder/WebpackConfig.js:31:13)
    at Object.<anonymous> (/Applications/XAMPP/xamppfiles/htdocs/clinic/node_modules/laravel-mix/setup/webpack.config.js:29:38)
    at Module._compile (/Applications/XAMPP/xamppfiles/htdocs/clinic/node_modules/v8-compile-cache/v8-compile-cache.js:192:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
    at Module.load (internal/modules/cjs/loader.js:600:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
    at Function.Module._load (internal/modules/cjs/loader.js:531:3)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (/Applications/XAMPP/xamppfiles/htdocs/clinic/node_modules/v8-compile-cache/v8-compile-cache.js:161:20)
    at WEBPACK_OPTIONS (/Applications/XAMPP/xamppfiles/htdocs/clinic/node_modules/webpack-cli/bin/utils/convert-argv.js:116:13)
    at requireConfig (/Applications/XAMPP/xamppfiles/htdocs/clinic/node_modules/webpack-cli/bin/utils/convert-argv.js:118:6)
    at /Applications/XAMPP/xamppfiles/htdocs/clinic/node_modules/webpack-cli/bin/utils/convert-argv.js:125:17
    at Array.forEach (<anonymous>)
    at module.exports (/Applications/XAMPP/xamppfiles/htdocs/clinic/node_modules/webpack-cli/bin/utils/convert-argv.js:123:15)
    at yargs.parse (/Applications/XAMPP/xamppfiles/htdocs/clinic/node_modules/webpack-cli/bin/cli.js:71:45)
    at Object.parse (/Applications/XAMPP/xamppfiles/htdocs/clinic/node_modules/webpack-cli/node_modules/yargs/yargs.js:567:18)
    at /Applications/XAMPP/xamppfiles/htdocs/clinic/node_modules/webpack-cli/bin/cli.js:49:8
    at Object.<anonymous> (/Applications/XAMPP/xamppfiles/htdocs/clinic/node_modules/webpack-cli/bin/cli.js:365:3)
    at Module._compile (internal/modules/cjs/loader.js:701:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
    at Module.load (internal/modules/cjs/loader.js:600:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
    at Function.Module._load (internal/modules/cjs/loader.js:531:3)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:22:18)
    at Object.<anonymous> (/Applications/XAMPP/xamppfiles/htdocs/clinic/node_modules/webpack/bin/webpack.js:156:2)
    at Module._compile (internal/modules/cjs/loader.js:701:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
    at Module.load (internal/modules/cjs/loader.js:600:32)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @1.2.0 development: `cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js "--watch"`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the @1.2.0 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/fgh/.npm/_logs/2019-07-19T13_36_38_700Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @1.2.0 watch: `npm run development -- --watch`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the @1.2.0 watch 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/fgh/.npm/_logs/2019-07-19T13_36_38_755Z-debug.log

0 个答案:

没有答案