簡體   English   中英

無法安裝 npm dev / npm watch for Laravel 5.6

[英]Failed to install npm dev / npm watch for Laravel 5.6

I'm working on a project in Laravel 5.6, I've installed npm successfully, but when I run npm run dev or npm run watch , I get this error:

$ npm run dev

> @ dev C:\wamp64\www\QuAn
> npm run development


> @ development C:\wamp64\www\QuAn
> cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js

11% building 9/14 modules 5 active ...elector.js?type=template&index=0!C:\wamp64\www\QuAn\resources\assets\js\components\ExampleComponent.vue{ parser: "babylon" } is deprecated; we now treat it as { parser: "babel" }.
78% module and chunk tree optimization unnamed compat pluginC:\wamp64\www\QuAn\node_modules\webpack\lib\Chunk.js:861
                throw new Error(
                ^

Error: Chunk.entrypoints: Use Chunks.groupsIterable and filter by instanceof Entrypoint instead
    at Chunk.get (C:\wamp64\www\QuAn\node_modules\←[4mwebpack←[24m\lib\Chunk.js:861:9)
    at C:\wamp64\www\QuAn\node_modules\←[4mextract-text-webpack-plugin←[24m\dist\index.js:176:48
    at Array.forEach (<anonymous>)
    at C:\wamp64\www\QuAn\node_modules\←[4mextract-text-webpack-plugin←[24m\dist\index.js:171:18
    at AsyncSeriesHook.eval [as callAsync] (eval at create (C:\wamp64\www\QuAn\node_modules\←[4mwebpack←[24m\node_modules\←[4mtapable←[24m\lib\HookCodeFactory.js:33:10), <anonymous>:12:1)
    at AsyncSeriesHook.lazyCompileHook (C:\wamp64\www\QuAn\node_modules\←[4mwebpack←[24m\node_modules\←[4mtapable←[24m\lib\Hook.js:154:20)
    at Compilation.seal (C:\wamp64\www\QuAn\node_modules\←[4mwebpack←[24m\lib\Compilation.js:1342:27)
    at C:\wamp64\www\QuAn\node_modules\←[4mwebpack←[24m\lib\Compiler.js:675:18
    at C:\wamp64\www\QuAn\node_modules\←[4mwebpack←[24m\lib\Compilation.js:1261:4
    at AsyncSeriesHook.eval [as callAsync] (eval at create (C:\wamp64\www\QuAn\node_modules\←[4mwebpack←[24m\node_modules\←[4mtapable←[24m\lib\HookCodeFactory.js:33:10), <anonymous>:31:1)
    at AsyncSeriesHook.lazyCompileHook (C:\wamp64\www\QuAn\node_modules\←[4mwebpack←[24m\node_modules\←[4mtapable←[24m\lib\Hook.js:154:20)
    at Compilation.finish (C:\wamp64\www\QuAn\node_modules\←[4mwebpack←[24m\lib\Compilation.js:1253:28)
    at C:\wamp64\www\QuAn\node_modules\←[4mwebpack←[24m\lib\Compiler.js:672:17
    at eval (eval at create (C:\wamp64\www\QuAn\node_modules\←[4mwebpack←[24m\node_modules\←[4mtapable←[24m\lib\HookCodeFactory.js:33:10), <anonymous>:11:1)
    at C:\wamp64\www\QuAn\node_modules\←[4mwebpack←[24m\lib\Compilation.js:1185:12
    at C:\wamp64\www\QuAn\node_modules\←[4mwebpack←[24m\lib\Compilation.js:1097:9
←[90m    at processTicksAndRejections (internal/process/task_queues.js:75:11)←[39m
npm ERR! code ELIFECYCLE
npm ERR! errno 1
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 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!     C:\Users\INFO\AppData\Roaming\npm-cache\_logs\2019-09-20T21_53_25_570Z-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!     C:\Users\INFO\AppData\Roaming\npm-cache\_logs\2019-09-20T21_53_25_604Z-debug.log

我嘗試清理緩存、刪除 node_modules、文件並重新安裝 npm 但似乎沒有任何問題可以解決。

版本: Laravel 5.6Node 12.10npm 6.11.3

我認為這個解決方案會幫助你github閱讀 JeffreyWay 評論

嘗試完全重置:

rm -rf node_modules
rm package-lock.json yarn.lock
npm cache clear --force
npm install

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM