终于找到正确答案

终于找到正确答案

Windows10环境 npm run dev 报错  终于找到正确答案

Error: EPERM: operation not permitted, open '/data/public/build/css/add.png'

原因: 我是运行在docker的php环境中的,nginx 和php-fpm在 docker中, 解决: 停止docker中的nginx 重新执行 npm run dev 就可以了   执行之后再start启动docker就可以了
感谢 https://blog.csdn.net/w770583069/article/details/82116116 提供的思路
PS /data> npm run dev

> @ dev /data> npm run development

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

95% emitting

DONE  Compiled successfully in 610ms                                                                           12:33:39

fs.js:114throw err;^

Error: EPERM: operation not permitted, open '/data/public/build/css/add.png'at Object.openSync (fs.js:438:3)at copyFileSync (/data/node_modules/fs-extra/lib/copy-sync/copy-file-sync.js:23:18)at Object.copySync (/data/node_modules/fs-extra/lib/copy-sync/copy-sync.js:43:5)at File.copyTo (/data/node_modules/laravel-mix/src/File.js:193:12)at FileCollection.copyTo (/data/node_modules/laravel-mix/src/FileCollection.js:101:13)at src.forEach.file (/data/node_modules/laravel-mix/src/FileCollection.js:76:38)at Array.forEach (<anonymous>)    at FileCollection.copyTo (/data/node_modules/laravel-mix/src/FileCollection.js:76:17)    at FileCollection.copyTo (/data/node_modules/laravel-mix/src/FileCollection.js:94:25)    at src.forEach.file (/data/node_modules/laravel-mix/src/FileCollection.js:76:38)    at Array.forEach (<anonymous>)        at FileCollection.copyTo (/data/node_modules/laravel-mix/src/FileCollection.js:76:17)        at CopyFilesTask.run (/data/node_modules/laravel-mix/src/tasks/CopyFilesTask.js:14:20)        at CustomTasksPlugin.runTask (/data/node_modules/laravel-mix/src/webpackPlugins/CustomTasksPlugin.js:33:14)        at Mix.tasks.forEach.task (/data/node_modules/laravel-mix/src/webpackPlugins/CustomTasksPlugin.js:9:44)        at Array.forEach (<anonymous>)            at Compiler.compiler.plugin.stats (/data/node_modules/laravel-mix/src/webpackPlugins/CustomTasksPlugin.js:9:23)            at Compiler.applyPlugins (/data/node_modules/tapable/lib/Tapable.js:61:14)            at emitRecords.err (/data/node_modules/webpack/lib/Compiler.js:264:11)            at Compiler.emitRecords (/data/node_modules/webpack/lib/Compiler.js:371:38)            at emitAssets.err (/data/node_modules/webpack/lib/Compiler.js:258:10)            at applyPluginsAsyncSeries1.err (/data/node_modules/webpack/lib/Compiler.js:364:12)            at next (/data/node_modules/tapable/lib/Tapable.js:218:11)            at Compiler.compiler.plugin (/data/node_modules/webpack/lib/performance/SizeLimitsPlugin.js:99:4)            at Compiler.applyPluginsAsyncSeries1 (/data/node_modules/tapable/lib/Tapable.js:222:13)            at Compiler.afterEmit (/data/node_modules/webpack/lib/Compiler.js:361:9)            at require.forEach.err (/data/node_modules/webpack/lib/Compiler.js:350:15)            at /data/node_modules/async/dist/async.js:473:16            at iteratorCallback (/data/node_modules/async/dist/async.js:1064:13)            at /data/node_modules/async/dist/async.js:969:16            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!     C:/Users/Administrator.PC-20190309QPVT/AppData/Roaming/npm-cache/_logs/2019-03-21T04_33_39_487Z-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!     C:/Users/Administrator.PC-20190309QPVT/AppData/Roaming/npm-cache/_logs/2019-03-21T04_33_39_515Z-debug.log
05-02 23:16