0

我将 webpack 与 copy-webpack-plugin 一起使用。我已经搜索了有关此错误的所有内容,并且很可能这似乎是权限问题。大多数问题在较新版本中已“修复”,而我使用的是更高/更新的版本。所以我应该很好。但是没有。

网络包配置:

new CopyPlugin({
        patterns: [
            {
                from: path.resolve(__dirname, 'node_modules/@fortawesome/fontawesome-free'),
                to: path.resolve(__dirname, "wwwroot/"),
            }
        ],
    }),

npm/webpack 日志:

    0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli   'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli   'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'run',
1 verbose cli   'build'
1 verbose cli ]
2 info using npm@6.14.14
3 info using node@v14.17.5
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle Gathering@1.0.0~prebuild: Gathering@1.0.0
6 info lifecycle Gathering@1.0.0~build: Gathering@1.0.0
7 verbose lifecycle Gathering@1.0.0~build: unsafe-perm in lifecycle true
8 verbose lifecycle Gathering@1.0.0~build: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Code\Websites\MSL.Tools\Gathering\node_modules\.bin;C:\Users\niels\bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\local\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Users\niels\bin;C:\Program Files\Common Files\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\WINDOWS\System32\OpenSSH;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files\Git\cmd;C:\Program Files\dotnet;C:\Program Files\Microsoft SQL Server\130\Tools\Binn;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn;C:\Program Files (x86)\Microsoft SQL Server\150\Tools\Binn;C:\Program Files\Microsoft SQL Server\150\Tools\Binn;C:\Program Files\Microsoft SQL Server\150\DTS\Binn;C:\Program Files (x86)\Microsoft SQL Server\150\DTS\Binn;C:\Program Files\Azure Data Studio\bin;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\nodejs;C:\Users\niels\AppData\Local\Microsoft\WindowsApps;C:\Users\niels\.dotnet\tools;C:\Program Files\Azure Data Studio\bin;C:\Users\niels\AppData\Roaming\npm;C:\Users\niels\AppData\Local\Programs\Microsoft VS Code\bin;C:\Program Files\Git\usr\bin\vendor_perl;C:\Program Files\Git\usr\bin\core_perl
9 verbose lifecycle Gathering@1.0.0~build: CWD: C:\Code\Websites\MSL.Tools\Gathering
10 silly lifecycle Gathering@1.0.0~build: Args: [ '/d /s /c', 'webpack' ]
11 silly lifecycle Gathering@1.0.0~build: Returned: code: 3221225477  signal: null
12 info lifecycle Gathering@1.0.0~build: Failed to exec build script
13 verbose stack Error: Gathering@1.0.0 build: `webpack`
13 verbose stack Exit status 3221225477
13 verbose stack     at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
13 verbose stack     at EventEmitter.emit (events.js:400:28)
13 verbose stack     at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:400:28)
13 verbose stack     at maybeClose (internal/child_process.js:1055:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
14 verbose pkgid Gathering@1.0.0
15 verbose cwd C:\Code\Websites\MSL.Tools\Gathering
16 verbose Windows_NT 10.0.19043
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "build"
18 verbose node v14.17.5
19 verbose npm  v6.14.14
20 error code ELIFECYCLE
21 error errno 3221225477
22 error Gathering@1.0.0 build: `webpack`
22 error Exit status 3221225477
23 error Failed at the Gathering@1.0.0 build script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 3221225477, true ]

我没有解决这个问题的经验,你知道吗?

4

0 回答 0