Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm run sync错误 #33

Closed
leafsnow opened this issue Sep 7, 2022 · 3 comments
Closed

npm run sync错误 #33

leafsnow opened this issue Sep 7, 2022 · 3 comments

Comments

@leafsnow
Copy link

leafsnow commented Sep 7, 2022

PS F:\Project\Pests\Server> npm run sync

[email protected] sync
tsrpc-cli 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 [email protected]
2 info using [email protected]
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 [email protected]
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

@leafsnow
Copy link
Author

leafsnow commented Sep 7, 2022

目录结构如下:
image
这里是后端Server

image
这里是前端的网络代码

@leafsnow
Copy link
Author

leafsnow commented Sep 7, 2022

sync: [
    {
        from: 'src/shared',
        to: '../Pests/assets/Script/Net/shared',
        type: 'copy'     // Change this to 'copy' if your environment not support symlink
    }
],

换成copy

@leafsnow leafsnow closed this as completed Sep 7, 2022
@k8w
Copy link
Owner

k8w commented Sep 21, 2022

你好,目测是 NodeJS 版本过低导致的(不支持 fs.rm),建议使用 Node 14 以上版本。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants