Closed leafsnow closed 2 years ago
目录结构如下: 这里是后端Server
这里是前端的网络代码
sync: [
{
from: 'src/shared',
to: '../Pests/assets/Script/Net/shared',
type: 'copy' // Change this to 'copy' if your environment not support symlink
}
],
换成copy
你好,目测是 NodeJS 版本过低导致的(不支持 fs.rm
),建议使用 Node 14 以上版本。
PS F:\Project\Pests\Server> npm run sync
错误 fs__default$1.default.rm is not a function npm ERR! code 4294967295 npm ERR! path F:\Project\Pests\Server npm ERR! command failed npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c tsrpc-cli sync
npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\35730\AppData\Local\npm-cache_logs\2022-09-07T08_30_48_643Z-debug.log
0 verbose cli [ 0 verbose cli 'D:\nodejs\node.exe', 0 verbose cli 'C:\Users\35730\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js', 0 verbose cli 'run', 0 verbose cli 'sync' 0 verbose cli ] 1 info using npm@7.5.4 2 info using node@v12.16.1 3 timing config:load:defaults Completed in 3ms 4 timing config:load:file:C:\Users\35730\AppData\Roaming\npm\node_modules\npm\npmrc Completed in 2ms 5 timing config:load:builtin Completed in 2ms 6 timing config:load:cli Completed in 2ms 7 timing config:load:env Completed in 0ms 8 timing config:load:file:F:\Project\Pests\Server.npmrc Completed in 0ms 9 timing config:load:project Completed in 1ms 10 timing config:load:file:C:\Users\35730.npmrc Completed in 0ms 11 timing config:load:user Completed in 0ms 12 timing config:load:file:C:\Users\35730\AppData\Roaming\npm\etc\npmrc Completed in 1ms 13 timing config:load:global Completed in 1ms 14 timing config:load:cafile Completed in 0ms 15 timing config:load:validate Completed in 0ms 16 timing config:load:setUserAgent Completed in 0ms 17 timing config:load:setEnvs Completed in 1ms 18 timing config:load Completed in 10ms 19 verbose npm-session 74022eb5a037d18f 20 timing npm:load Completed in 20ms 21 timing command:run-script Completed in 1989ms 22 verbose stack Error: command failed 22 verbose stack at ChildProcess. (C:\Users\35730\AppData\Roaming\npm\node_modules\npm\node_modules\@npmcli\promise-spawn\index.js:64:27)
22 verbose stack at ChildProcess.emit (events.js:311:20)
22 verbose stack at maybeClose (internal/child_process.js:1021:16)
22 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
23 verbose pkgid TSRPC-.@0.1.0
24 verbose cwd F:\Project\Pests\Server
25 verbose Windows_NT 10.0.19044
26 verbose argv "D:\nodejs\node.exe" "C:\Users\35730\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js" "run" "sync"
27 verbose node v12.16.1
28 verbose npm v7.5.4
29 error code 4294967295
30 error path F:\Project\Pests\Server
31 error command failed
32 error command C:\WINDOWS\system32\cmd.exe /d /s /c tsrpc-cli sync
33 verbose exit 4294967295