Я создал новый проект в laravel 6 и после установки npm Я запустил npm run watch
, я получаю эту ошибку.
Ahmed@DESKTOP-G216VK0 MINGW64 /c/laragon/www/larabiz
$ npm run watch
> @ watch C:\laragon\www\larabiz
> npm run development -- --watch
> @ development C:\laragon\www\larabiz
> cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js "--watch"
10% building 1/1 modules 0 active
webpack is watching the files…
98% after emitting SizeLimitsPlugin
ERROR Failed to compile with 1 errors 9:37:44 PM
error in ./resources/js/app.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
Error: Package exports for 'C:\laragon\www\larabiz\node_modules\@babel\helper-compilation-targets' do not define a '.' subpath
at applyExports (internal/modules/cjs/loader.js:485:15)
at resolveExports (internal/modules/cjs/loader.js:508:12)
at Function.Module._findPath (internal/modules/cjs/loader.js:577:20)
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:879:27)
at Function.Module._load (internal/modules/cjs/loader.js:785:27)
at Module.require (internal/modules/cjs/loader.js:956:19)
at require (C:\laragon\www\larabiz\node_modules\v8-compile-cache\v8-compile-cache.js:161:20)
at Object.<anonymous> (C:\laragon\www\larabiz\node_modules\@babel\preset-env\lib\debug.js:8:33)
at Module._compile (C:\laragon\www\larabiz\node_modules\v8-compile-cache\v8-compile-cache.js:192:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1103:10)
at Module.load (internal/modules/cjs/loader.js:914:32)
at Function.Module._load (internal/modules/cjs/loader.js:822:14)
at Module.require (internal/modules/cjs/loader.js:956:19)
at require (C:\laragon\www\larabiz\node_modules\v8-compile-cache\v8-compile-cache.js:161:20)
at Object.<anonymous> (C:\laragon\www\larabiz\node_modules\@babel\preset-env\lib\index.js:11:14)
at Module._compile (C:\laragon\www\larabiz\node_modules\v8-compile-cache\v8-compile-cache.js:192:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1103:10)
at Module.load (internal/modules/cjs/loader.js:914:32)
at Function.Module._load (internal/modules/cjs/loader.js:822:14)
at Module.require (internal/modules/cjs/loader.js:956:19)
at require (C:\laragon\www\larabiz\node_modules\v8-compile-cache\v8-compile-cache.js:161:20)
at requireModule (C:\laragon\www\larabiz\node_modules\@babel\core\lib\config\files\plugins.js:165:12)
at loadPreset (C:\laragon\www\larabiz\node_modules\@babel\core\lib\config\files\plugins.js:83:17)
at createDescriptor (C:\laragon\www\larabiz\node_modules\@babel\core\lib\config\config-descriptors.js:154:9)
at C:\laragon\www\larabiz\node_modules\@babel\core\lib\config\config-descriptors.js:109:50
at Array.map (<anonymous>)
at createDescriptors (C:\laragon\www\larabiz\node_modules\@babel\core\lib\config\config-descriptors.js:109:29)
at createPresetDescriptors (C:\laragon\www\larabiz\node_modules\@babel\core\lib\config\config-descriptors.js:101:10)
at C:\laragon\www\larabiz\node_modules\@babel\core\lib\config\config-descriptors.js:58:104
at cachedFunction (C:\laragon\www\larabiz\node_modules\@babel\core\lib\config\caching.js:62:27)
at cachedFunction.next (<anonymous>)
at evaluateSync (C:\laragon\www\larabiz\node_modules\gensync\index.js:244:28)
at sync (C:\laragon\www\larabiz\node_modules\gensync\index.js:84:14)
at presets (C:\laragon\www\larabiz\node_modules\@babel\core\lib\config\config-descriptors.js:29:84)
at mergeChainOpts (C:\laragon\www\larabiz\node_modules\@babel\core\lib\config\config-chain.js:320:26)
at C:\laragon\www\larabiz\node_modules\@babel\core\lib\config\config-chain.js:283:7
@ multi ./resources/js/app.js ./resources/sass/app.scss
Asset Size Chunks Chunk Names
/css/app.css 0 bytes /js/app [emitted] /js/app
/js/app.js 7.86 KiB /js/app [emitted] /js/app
ERROR in ./resources/js/app.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
Error: Package exports for 'C:\laragon\www\larabiz\node_modules\@babel\helper-compilation-targets' do not define a '.' subpath
at applyExports (internal/modules/cjs/loader.js:485:15)
at resolveExports (internal/modules/cjs/loader.js:508:12)
at Function.Module._findPath (internal/modules/cjs/loader.js:577:20)
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:879:27)
at Function.Module._load (internal/modules/cjs/loader.js:785:27)
at Module.require (internal/modules/cjs/loader.js:956:19)
at require (C:\laragon\www\larabiz\node_modules\v8-compile-cache\v8-compile-cache.js:161:20)
at Object.<anonymous> (C:\laragon\www\larabiz\node_modules\@babel\preset-env\lib\debug.js:8:33)
at Module._compile (C:\laragon\www\larabiz\node_modules\v8-compile-cache\v8-compile-cache.js:192:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1103:10)
at Module.load (internal/modules/cjs/loader.js:914:32)
at Function.Module._load (internal/modules/cjs/loader.js:822:14)
at Module.require (internal/modules/cjs/loader.js:956:19)
at require (C:\laragon\www\larabiz\node_modules\v8-compile-cache\v8-compile-cache.js:161:20)
at Object.<anonymous> (C:\laragon\www\larabiz\node_modules\@babel\preset-env\lib\index.js:11:14)
at Module._compile (C:\laragon\www\larabiz\node_modules\v8-compile-cache\v8-compile-cache.js:192:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1103:10)
at Module.load (internal/modules/cjs/loader.js:914:32)
at Function.Module._load (internal/modules/cjs/loader.js:822:14)
at Module.require (internal/modules/cjs/loader.js:956:19)
at require (C:\laragon\www\larabiz\node_modules\v8-compile-cache\v8-compile-cache.js:161:20)
at requireModule (C:\laragon\www\larabiz\node_modules\@babel\core\lib\config\files\plugins.js:165:12)
at loadPreset (C:\laragon\www\larabiz\node_modules\@babel\core\lib\config\files\plugins.js:83:17)
at createDescriptor (C:\laragon\www\larabiz\node_modules\@babel\core\lib\config\config-descriptors.js:154:9)
at C:\laragon\www\larabiz\node_modules\@babel\core\lib\config\config-descriptors.js:109:50
at Array.map (<anonymous>)
at createDescriptors (C:\laragon\www\larabiz\node_modules\@babel\core\lib\config\config-descriptors.js:109:29)
at createPresetDescriptors (C:\laragon\www\larabiz\node_modules\@babel\core\lib\config\config-descriptors.js:101:10)
at C:\laragon\www\larabiz\node_modules\@babel\core\lib\config\config-descriptors.js:58:104
at cachedFunction (C:\laragon\www\larabiz\node_modules\@babel\core\lib\config\caching.js:62:27)
at cachedFunction.next (<anonymous>)
at evaluateSync (C:\laragon\www\larabiz\node_modules\gensync\index.js:244:28)
at sync (C:\laragon\www\larabiz\node_modules\gensync\index.js:84:14)
at presets (C:\laragon\www\larabiz\node_modules\@babel\core\lib\config\config-descriptors.js:29:84)
at mergeChainOpts (C:\laragon\www\larabiz\node_modules\@babel\core\lib\config\config-chain.js:320:26)
at C:\laragon\www\larabiz\node_modules\@babel\core\lib\config\config-chain.js:283:7
@ multi ./resources/js/app.js ./resources/sass/app.scss /js/app[0]
Package.json
file:
{
"private": true,
"scripts": {
"dev": "npm run development",
"development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"watch": "npm run development -- --watch",
"watch-poll": "npm run watch -- --watch-poll",
"hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
"prod": "npm run production",
"production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
},
"devDependencies": {
"babel-core": "^6.26.0",
"babel-loader": "^7.1.4",
"babel-preset-env": "^1.6.1",
"axios": "^0.19",
"cross-env": "^5.1",
"laravel-mix": "^4.0.7",
"lodash": "^4.17.13",
"resolve-url-loader": "^2.3.1",
"sass": "^1.15.2",
"sass-loader": "^7.1.0",
"vue-template-compiler": "^2.6.11",
"webpack": "^4.41.5"
}
}