У меня такая незначительная проблема, и мне нужна ваша помощь.
Если у меня есть copyDirectory () и version () в веб-пакете. mix. js вместе, ошибка возникает после указанного npm run prod
Я не знаю, как это сделать, чтобы он работал без ошибок .. .
Спасибо за ваш ответ и помощь.
webpack.mix. js
mix.js('resources/js/app.js', 'public/global/plugins/js/bundle.js')
.sass('resources/sass/app.scss', 'public/global/plugins/css/bundle.css')
.copyDirectory('node_modules/animate.css', 'public/global/plugins/animate')
.copyDirectory('node_modules/slicknav', 'public/global/plugins/slicknav')
.sourceMaps();
mix.js('resources/js/app/scripts/script.main.js', 'public/local/themes/default/app/js/script.main.js')
.sass('resources/sass/app/app.main.scss', 'public/local/themes/default/app/css/app.main.css')
.version()
.sourceMaps();
Ошибка вывода
Error: EISDIR: illegal operation on a directory, read
at Object.readSync (fs.js:537:3)
at tryReadSync (fs.js:352:20)
at Object.readFileSync (fs.js:389:19)
at File.read C:\laragon\www\laravel-vue\node_modules\laravel-mix\src\File.js:166:19)
at File.version C:\laragon\www\laravel-vue\node_modules\laravel-mix\src\File.js:173:25)
at Manifest.hash C:\laragon\www\laravel-vue\node_modules\laravel-mix\src\Manifest.js:52:65)
at C:\laragon\www\laravel-vue\node_modules\laravel-mix\src\webpackPlugins\CustomTasksPlugin.js:77:26
at Collection.each C:\laragon\www\laravel-vue\node_modules\collect.js\dist\methods\each.js:21:14)
at CustomTasksPlugin.applyVersioning C:\laragon\www\laravel-vue\node_modules\laravel-mix\src\webpackPlugins\CustomTasksPlugin.js:76:37)
at C:\laragon\www\laravel-vue\node_modules\laravel-mix\src\webpackPlugins\CustomTasksPlugin.js:15:22
at AsyncSeriesHook.eval [as callAsync] (eval at create (C:\laragon\www\laravel-vue\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:16:1)
at AsyncSeriesHook.lazyCompileHook (C:\laragon\www\laravel-vue\node_modules\tapable\lib\Hook.js:154:20)
at C:\laragon\www\laravel-vue\node_modules\webpack\lib\Compiler.js:304:22
at Compiler.emitRecords (C:\laragon\www\laravel-vue\node_modules\webpack\lib\Compiler.js:499:39)
at C:\laragon\www\laravel-vue\node_modules\webpack\lib\Compiler.js:298:10
at C:\laragon\www\laravel-vue\node_modules\webpack\lib\Compiler.js:485:14
at AsyncSeriesHook.eval [as callAsync] (eval at create (C:\laragon\www\laravel-vue\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:13:1)
at AsyncSeriesHook.lazyCompileHook (C:\laragon\www\laravel-vue\node_modules\tapable\lib\Hook.js:154:20)
at C:\laragon\www\laravel-vue\node_modules\webpack\lib\Compiler.js:482:27
at C:\laragon\www\laravel-vue\node_modules\neo-async\async.js:2818:7
at done (C:\laragon\www\laravel-vue\node_modules\neo-async\async.js:3522:9)
at AsyncSeriesHook.eval [as callAsync] (eval at create (C:\laragon\www\laravel-vue\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:4:1)
at C:\laragon\www\laravel-vue\node_modules\webpack\lib\Compiler.js:464:33
at C:\laragon\www\laravel-vue\node_modules\graceful-fs\graceful-fs.js:57:14
at FSReqCallback.oncomplete (fs.js:158:23)
npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! @ 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`
npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the @ production 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:\***\npm-cache\_logs\2020-03-28T19_06_29_987Z-debug.log npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! @ prod: `npm run production` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the @ prod 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:\***\npm-cache\_logs\2020-03-28T19_06_30_080Z-debug.log