我不知道我的 PC 發生了什么,但每次我創建 NextJS 應用程式并運行開發時。它將回傳此錯誤
error - ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[2].oneOf[8].use[1]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[2].oneOf[8].use[2]!./styles/globals.css
TypeError: Cannot read property 'config' of undefined
(node:20136) [DEP_WEBPACK_MODULE_ISSUER] DeprecationWarning: Module.issuer: Use new ModuleGraph API
(Use `node --trace-deprecation ...` to show where the warning was created)
wait - compiling /_error (client and server)...
error - ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[2].oneOf[8].use[1]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[2].oneOf[8].use[2]!./styles/globals.css
TypeError: Cannot read property 'config' of undefined
at runMicrotasks (<anonymous>)
<w> [webpack.cache.PackFileCacheStrategy] Caching failed for pack: Error: ENOENT: no such file or directory, rename 'C:\laragon\www\bayu-personal-website\.next\cache\webpack\client-development-fallback\0.pack_' -> 'C:\laragon\www\bayu-personal-website\.next\cache\webpack\client-development-fallback\0.pack'
我在我的專案中找不到任何導致此錯誤的原因,因為它發生在我運行yarn create-next-app和yarn dev. 先感謝您。
uj5u.com熱心網友回復:
我設法在 Users/ 目錄上創建了 nextJS 專案,結果證明它修復了錯誤。在此之前,我在 Users/ 目錄之外創建了專案(直接在 C: 上并在那里創建檔案夾)。所以也許是許可的事情使專案無法運行。
轉載請註明出處,本文鏈接:https://www.uj5u.com/caozuo/429160.html
上一篇:錯誤訊息:Web3 create-react-app webpack5
下一篇:linux 普通磁區與lvm磁區
