некоторая проблема с npm run dev

#php #laravel #npm

#php #laravel #npm

Вопрос:

у меня есть некоторые проблемы с npm
, версия npm
— 6.14.8, версия laravel — 8

когда я использую npm run dev , я сталкиваюсь с этими ошибками :

 98% after emitting SizeLimitsPlugin

 ERROR  Failed to compile with 1 errors                                                                                                            9:16:24 PM

This dependency was not found:

* -!../../node_modules/css-loader/index.js??ref--5-2!../../node_modules/postcss-loader/src/index.js??postcss0!./custom in ./node_modules/css-loader??ref--5-2!./node_modules/postcss-loader/src??postcss0!./resources/css/app.css

To install it, you can run: npm install --save -!../../node_modules/css-loader/index.js??ref--5-2!../../node_modules/postcss-loader/src/index.js??postcss0!./custom
     Asset     Size   Chunks             Chunk Names
/js/app.js  598 KiB  /js/app  [emitted]  /js/app

ERROR in ./resources/css/app.css
Module build failed (from ./node_modules/css-loader/index.js):
ModuleNotFoundError: Module not found: Error: Can't resolve './custom' in 'F:Appxampphtdocsbasicbasic-websiteresourcescss'
    at F:Appxampphtdocsbasicbasic-websitenode_moduleswebpacklibCompilation.js:925:10
    at F:Appxampphtdocsbasicbasic-websitenode_moduleswebpacklibNormalModuleFactory.js:401:22
    at F:Appxampphtdocsbasicbasic-websitenode_moduleswebpacklibNormalModuleFactory.js:130:21
    at F:Appxampphtdocsbasicbasic-websitenode_moduleswebpacklibNormalModuleFactory.js:224:22
    at F:Appxampphtdocsbasicbasic-websitenode_modulesneo-asyncasync.js:2830:7
    at F:Appxampphtdocsbasicbasic-websitenode_modulesneo-asyncasync.js:6877:13
    at F:Appxampphtdocsbasicbasic-websitenode_moduleswebpacklibNormalModuleFactory.js:214:25
    at F:Appxampphtdocsbasicbasic-websitenode_modulesenhanced-resolvelibResolver.js:213:14
    at F:Appxampphtdocsbasicbasic-websitenode_modulesenhanced-resolvelibResolver.js:285:5
    at eval (eval at create (F:Appxampphtdocsbasicbasic-websitenode_modulestapablelibHookCodeFactory.js:33:10), <anonymous>:13:1)
    at F:Appxampphtdocsbasicbasic-websitenode_modulesenhanced-resolvelibUnsafeCachePlugin.js:44:7
    at F:Appxampphtdocsbasicbasic-websitenode_modulesenhanced-resolvelibResolver.js:285:5
    at eval (eval at create (F:Appxampphtdocsbasicbasic-websitenode_modulestapablelibHookCodeFactory.js:33:10), <anonymous>:13:1)
    at F:Appxampphtdocsbasicbasic-websitenode_modulesenhanced-resolvelibResolver.js:285:5
    at eval (eval at create (F:Appxampphtdocsbasicbasic-websitenode_modulestapablelibHookCodeFactory.js:33:10), <anonymous>:25:1)
    at F:Appxampphtdocsbasicbasic-websitenode_modulesenhanced-resolvelibDescriptionFilePlugin.js:67:43
    at F:Appxampphtdocsbasicbasic-websitenode_modulesenhanced-resolvelibResolver.js:285:5
    at eval (eval at create (F:Appxampphtdocsbasicbasic-websitenode_modulestapablelibHookCodeFactory.js:33:10), <anonymous>:14:1)
    at F:Appxampphtdocsbasicbasic-websitenode_modulesenhanced-resolvelibResolver.js:285:5
    at eval (eval at create (F:Appxampphtdocsbasicbasic-websitenode_modulestapablelibHookCodeFactory.js:33:10), <anonymous>:25:1)
    at F:Appxampphtdocsbasicbasic-websitenode_modulesenhanced-resolvelibDescriptionFilePlugin.js:67:43
    at F:Appxampphtdocsbasicbasic-websitenode_modulesenhanced-resolvelibResolver.js:285:5
    at eval (eval at create (F:Appxampphtdocsbasicbasic-websitenode_modulestapablelibHookCodeFactory.js:33:10), <anonymous>:14:1)
    at F:Appxampphtdocsbasicbasic-websitenode_modulesenhanced-resolvelibResolver.js:285:5
    at eval (eval at create (F:Appxampphtdocsbasicbasic-websitenode_modulestapablelibHookCodeFactory.js:33:10), <anonymous>:13:1)
    at F:Appxampphtdocsbasicbasic-websitenode_modulesenhanced-resolvelibDirectoryExistsPlugin.js:27:15
    at F:Appxampphtdocsbasicbasic-websitenode_modulesenhanced-resolvelibCachedInputFileSystem.js:85:15
    at processTicksAndRejections (internal/process/task_queues.js:79:11)
 @ ./resources/css/app.css

ERROR in ./resources/css/app.css (./node_modules/css-loader??ref--5-2!./node_modules/postcss-loader/src??postcss0!./resources/css/app.css)
Module not found: Error: Can't resolve './custom' in 'F:Appxampphtdocsbasicbasic-websiteresourcescss'
 @ ./resources/css/app.css (./node_modules/css-loader??ref--5-2!./node_modules/postcss-loader/src??postcss0!./resources/css/app.css) 3:10-137
 @ ./resources/css/app.css
npm ERR! code ELIFECYCLE
npm ERR! errno 2
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 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!     C:UserspcAppDataRoamingnpm-cache_logs2020-10-21T17_46_24_559Z-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!     C:UserspcAppDataRoamingnpm-cache_logs2020-10-21T17_46_24_640Z-debug.log
  

я погуглил проблему, но не нахожу решения

если я перейду на laravel 7, проблема будет решена?

кто-нибудь может мне помочь, пожалуйста?

Комментарии:

1. В сообщении буквально говорится, как вы можете это исправить. Вы пробовали то, что он сказал в To install it, you can run строке? Обратите внимание, что это npm проблема, не имеющая ничего общего с php и очень мало связанная с Laravel.

2. На самом деле, глядя на это, он говорит, что это проблема в ./resources/css/app.css , так что, вероятно, там какой-то плохой css, указывающий на просто ./custom

3. да, попробуйте npm install —save, но это не был ответ

4. tnx, который мне подсказал