簡體   English   中英

Laravel 5.4 npm run dev 錯誤:錯誤:找不到模塊“lodash._baseclone”

[英]Laravel 5.4 npm run dev error: Error: Cannot find module 'lodash._baseclone'

我正在嘗試運行以下命令:npm run dev。 但是,它給出了一個錯誤

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

module.js:471
throw err;
^

Error: Cannot find module 'lodash._baseclone'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/var/www/html/korsall-clean/node_modules/node-
notifier/node_modules/lodash.clonedeep/index.js:9:17)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
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!     /home/ubuntu/.npm/_logs/2017-06-07T10_34_11_411Z-
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/ubuntu/.npm/_logs/2017-06-07T10_34_11_426Z-
debug.log

我已經刪除了 node_modules 文件夾並重新安裝了它,但它仍然給出了同樣的錯誤。

請指導我在哪里

我在這個線程中發現了一個非常相似的錯誤: https : //github.com/meteor/meteor/issues/7221#issuecomment-226595754

那里有一條評論說該問題與 260 個字符的 Windows 最大路徑限制有關。 我傾向於相信這是正確的,因為我知道我的設備沒有在 Windows 中啟用長路徑的問題 - https://docs.microsoft.com/en-us/windows/win32/fileio/maximum -file-path-limitation我在運行另一個版本的 Windows 的構建服務器上崩潰了。

試試這個 npm i --save lodash._baseclone

暫無
暫無

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

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