项目根路径下执行npm install 报错,如下,信息比较长,
```shell
- Running npm install --no-audit in ./app with electron config --
npm http fetch GET 200 https://codeload.github.com/bengotow/slate-edit-list/tar.gz/b868e1088b44ad1adb2cb06bbbb847a2fef7edb5 13315ms (cache revalidated)
npm http fetch GET 200 https://codeload.github.com/emorikawa/windows-shortcuts/tar.gz/b0a0fc7fb86fb03e06ddceb9cbd6c9c5c29e571e 13409ms (cache revalidated)
npm http fetch GET 200 https://codeload.github.com/bengotow/slate/tar.gz/4eb9d59ec29bca6d7edf8e61283249cf81034d65 13384ms (cache revalidated)
npm http fetch GET 200 https://codeload.github.com/emorikawa/debug/tar.gz/29685485665b44c42d33ebd7ed62570b21c6e4bd 13417ms (cache revalidated)
npm http fetch GET 200 https://codeload.github.com/bengotow/slate/tar.gz/cd6f40e8db9058f518c091cffe364608b3c858e6 14128ms (cache revalidated)
npm WARN cleanup Failed to remove some directories [
npm WARN cleanup [
npm WARN cleanup 'E:\\projects\\frontweb\\Mailspring-master\\app\\node_modules',
npm WARN cleanup [Error: EBUSY: resource busy or locked, rmdir 'E:\projects\frontweb\Mailspring-master\app\node_modules\cld'] {
npm WARN cleanup errno: -4082,
npm WARN cleanup code: 'EBUSY',
npm WARN cleanup syscall: 'rmdir',
npm WARN cleanup path: 'E:\\projects\\frontweb\\Mailspring-master\\app\\node_modules\\cld'
npm WARN cleanup }
npm WARN cleanup ]
npm WARN cleanup ]
npm ERR! code 1
npm ERR! path E:\projects\frontweb\Mailspring-master\app\node_modules\better-sqlite3
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c prebuild-install || npm run build-release
npm ERR! > better-sqlite3@7.5.0 build-release
npm ERR! > node-gyp rebuild --release
npm ERR!
npm ERR! �ڴ˽��������һ������һ����Ŀ����Ҫ���ò������ɣ������ӡ�/m�����ء�
npm ERR! symlink_builtin_sqlite3
npm ERR! sqlite3.c
npm ERR! win_delay_load_hook.cc
npm ERR! sqlite3.vcxproj -> E:\projects\frontweb\Mailspring-master\app\node_modules\better-sqlite3\build\Release\\sqlite3.lib
npm ERR! better_sqlite3.cpp
npm ERR! c:\users\administrator\appdata\local\node-gyp\cache\17.4.0\include\node\v8-function.h(15): fatal error C1083: �������ļ�: ��v8-template.h��: No such file or directory [E:\projects\frontweb\Mailspring-master\a pp\node_modules\better-sqlite3\build\better_sqlite3.vcxproj]
npm ERR! test_extension.c
npm ERR! win_delay_load_hook.cc
npm ERR! ���ڴ����� E:\projects\frontweb\Mailspring-master\app\node_modules\better-sqlite3\build\Release\test_extension.lib �Ͷ��� E:\projects\frontweb\Mailspring-master\app\node_modules\better-sqlite3\build\Release\test_extension.exp
npm ERR! test_extension.vcxproj -> E:\projects\frontweb\Mailspring-master\app\node_modules\better-sqlite3\build\Release\\test_extension.node
npm ERR! gyp ERR! build error
npm ERR! gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\MSBuild.exe` failed with exit code: 1
npm ERR! gyp ERR! stack at ChildProcess.onExit (E:\projects\frontweb\Mailspring-master\node_modules\_node-gyp@9.0.0@node-gyp\lib\build.js:194:23)
npm ERR! gyp ERR! stack at ChildProcess.emit (events.js:400:28)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
npm ERR! gyp ERR! System Windows_NT 10.0.19042
npm ERR! gyp ERR! command "D:\\programs\\nodejs\\node.exe" "E:\\projects\\frontweb\\Mailspring-master\\node_modules\\_node-gyp@9.0.0@node-gyp\\bin\\node-gyp.js" "rebuild" "--release"
npm ERR! gyp ERR! cwd E:\projects\frontweb\Mailspring-master\app\node_modules\better-sqlite3
npm ERR! gyp ERR! node -v v14.17.6
npm ERR! gyp ERR! node-gyp -v v9.0.0
npm ERR! gyp ERR! not ok
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Administrator\.npminstall_tarball\_logs\2022-05-23T10_52_36_278Z-debug-0.log
safeExec: the command exited with Error: Command failed: npm install --no-audit
npm http fetch GET 200 https://codeload.github.com/bengotow/slate-edit-list/tar.gz/b868e1088b44ad1adb2cb06bbbb847a2fef7edb5 13315ms (cache revalidated)
npm http fetch GET 200 https://codeload.github.com/emorikawa/windows-shortcuts/tar.gz/b0a0fc7fb86fb03e06ddceb9cbd6c9c5c29e571e 13409ms (cache revalidated)
npm http fetch GET 200 https://codeload.github.com/bengotow/slate/tar.gz/4eb9d59ec29bca6d7edf8e61283249cf81034d65 13384ms (cache revalidated)
npm http fetch GET 200 https://codeload.github.com/emorikawa/debug/tar.gz/29685485665b44c42d33ebd7ed62570b21c6e4bd 13417ms (cache revalidated)
npm http fetch GET 200 https://codeload.github.com/bengotow/slate/tar.gz/cd6f40e8db9058f518c091cffe364608b3c858e6 14128ms (cache revalidated)
npm WARN cleanup Failed to remove some directories [
npm WARN cleanup [
npm WARN cleanup 'E:\\projects\\frontweb\\Mailspring-master\\app\\node_modules',
npm WARN cleanup [Error: EBUSY: resource busy or locked, rmdir 'E:\projects\frontweb\Mailspring-master\app\node_modules\cld'] {
npm WARN cleanup errno: -4082,
npm WARN cleanup code: 'EBUSY',
npm WARN cleanup syscall: 'rmdir',
npm WARN cleanup path: 'E:\\projects\\frontweb\\Mailspring-master\\app\\node_modules\\cld'
npm WARN cleanup }
npm WARN cleanup ]
npm WARN cleanup ]
npm ERR! code 1
npm ERR! path E:\projects\frontweb\Mailspring-master\app\node_modules\better-sqlite3
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c prebuild-install || npm run build-release
npm ERR! > better-sqlite3@7.5.0 build-release
npm ERR! > node-gyp rebuild --release
npm ERR!
npm ERR! �ڴ˽��������һ������һ����Ŀ����Ҫ���ò������ɣ������ӡ�/m�����ء�
npm ERR! symlink_builtin_sqlite3
npm ERR! sqlite3.c
npm ERR! win_delay_load_hook.cc
npm ERR! sqlite3.vcxproj -> E:\projects\frontweb\Mailspring-master\app\node_modules\better-sqlite3\build\Release\\sqlite3.lib
npm ERR! better_sqlite3.cpp
npm ERR! c:\users\administrator\appdata\local\node-gyp\cache\17.4.0\include\node\v8-function.h(15): fatal error C1083: �������ļ�: ��v8-template.h��: No such file or directory [E:\projects\frontweb\Mailspring-master\a pp\node_modules\better-sqlite3\build\better_sqlite3.vcxproj]
npm ERR! test_extension.c
npm ERR! win_delay_load_hook.cc
npm ERR! ���ڴ����� E:\projects\frontweb\Mailspring-master\app\node_modules\better-sqlite3\build\Release\test_extension.lib �Ͷ��� E:\projects\frontweb\Mailspring-master\app\node_modules\better-sqlite3\build\Release\test_extension.exp
npm ERR! test_extension.vcxproj -> E:\projects\frontweb\Mailspring-master\app\node_modules\better-sqlite3\build\Release\\test_extension.node
npm ERR! gyp ERR! build error
npm ERR! gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\MSBuild.exe` failed with exit code: 1
npm ERR! gyp ERR! stack at ChildProcess.onExit (E:\projects\frontweb\Mailspring-master\node_modules\_node-gyp@9.0.0@node-gyp\lib\build.js:194:23)
npm ERR! gyp ERR! stack at ChildProcess.emit (events.js:400:28)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
npm ERR! gyp ERR! System Windows_NT 10.0.19042
npm ERR! gyp ERR! command "D:\\programs\\nodejs\\node.exe" "E:\\projects\\frontweb\\Mailspring-master\\node_modules\\_node-gyp@9.0.0@node-gyp\\bin\\node-gyp.js" "rebuild" "--release"
npm ERR! gyp ERR! cwd E:\projects\frontweb\Mailspring-master\app\node_modules\better-sqlite3
npm ERR! gyp ERR! node -v v14.17.6
npm ERR! gyp ERR! node-gyp -v v9.0.0
npm ERR! gyp ERR! not ok
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Administrator\.npminstall_tarball\_logs\2022-05-23T10_52_36_278Z-debug-0.log
1
`------------- stderr ------------
npm http fetch GET 200 https://codeload.github.com/bengotow/slate-edit-list/tar.gz/b868e1088b44ad1adb2cb06bbbb847a2fef7edb5 13315ms (cache revalidated)
npm http fetch GET 200 https://codeload.github.com/emorikawa/windows-shortcuts/tar.gz/b0a0fc7fb86fb03e06ddceb9cbd6c9c5c29e571e 13409ms (cache revalidated)
npm http fetch GET 200 https://codeload.github.com/bengotow/slate/tar.gz/4eb9d59ec29bca6d7edf8e61283249cf81034d65 13384ms (cache revalidated)
npm http fetch GET 200 https://codeload.github.com/emorikawa/debug/tar.gz/29685485665b44c42d33ebd7ed62570b21c6e4bd 13417ms (cache revalidated)
npm http fetch GET 200 https://codeload.github.com/bengotow/slate/tar.gz/cd6f40e8db9058f518c091cffe364608b3c858e6 14128ms (cache revalidated)
npm WARN cleanup Failed to remove some directories [
npm WARN cleanup [
npm WARN cleanup 'E:\\projects\\frontweb\\Mailspring-master\\app\\node_modules',
npm WARN cleanup [Error: EBUSY: resource busy or locked, rmdir 'E:\projects\frontweb\Mailspring-master\app\node_modules\cld'] {
npm WARN cleanup errno: -4082,
npm WARN cleanup code: 'EBUSY',
npm WARN cleanup syscall: 'rmdir',
npm WARN cleanup path: 'E:\\projects\\frontweb\\Mailspring-master\\app\\node_modules\\cld'
npm WARN cleanup }
npm WARN cleanup ]
npm WARN cleanup ]
npm ERR! code 1
npm ERR! path E:\projects\frontweb\Mailspring-master\app\node_modules\better-sqlite3
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c prebuild-install || npm run build-release
npm ERR! > better-sqlite3@7.5.0 build-release
npm ERR! > node-gyp rebuild --release
npm ERR!
npm ERR! �ڴ˽��������һ������һ����Ŀ����Ҫ���ò������ɣ������ӡ�/m�����ء�
npm ERR! symlink_builtin_sqlite3
npm ERR! sqlite3.c
npm ERR! win_delay_load_hook.cc
npm ERR! sqlite3.vcxproj -> E:\projects\frontweb\Mailspring-master\app\node_modules\better-sqlite3\build\Release\\sqlite3.lib
npm ERR! better_sqlite3.cpp
npm ERR! c:\users\administrator\appdata\local\node-gyp\cache\17.4.0\include\node\v8-function.h(15): fatal error C1083: �������ļ�: ��v8-template.h��: No such file or directory [E:\projects\frontweb\Mailspring-master\a pp\node_modules\better-sqlite3\build\better_sqlite3.vcxproj]
npm ERR! test_extension.c
npm ERR! win_delay_load_hook.cc
npm ERR! ���ڴ����� E:\projects\frontweb\Mailspring-master\app\node_modules\better-sqlite3\build\Release\test_extension.lib �Ͷ��� E:\projects\frontweb\Mailspring-master\app\node_modules\better-sqlite3\build\Release\test_extension.exp
npm ERR! test_extension.vcxproj -> E:\projects\frontweb\Mailspring-master\app\node_modules\better-sqlite3\build\Release\\test_extension.node
npm ERR! gyp ERR! build error
npm ERR! gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\MSBuild.exe` failed with exit code: 1
npm ERR! gyp ERR! stack at ChildProcess.onExit (E:\projects\frontweb\Mailspring-master\node_modules\_node-gyp@9.0.0@node-gyp\lib\build.js:194:23)
npm ERR! gyp ERR! stack at ChildProcess.emit (events.js:400:28)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
npm ERR! gyp ERR! System Windows_NT 10.0.19042
npm ERR! gyp ERR! command "D:\\programs\\nodejs\\node.exe" "E:\\projects\\frontweb\\Mailspring-master\\node_modules\\_node-gyp@9.0.0@node-gyp\\bin\\node-gyp.js" "rebuild" "--release"
npm ERR! gyp ERR! cwd E:\projects\frontweb\Mailspring-master\app\node_modules\better-sqlite3
npm ERR! gyp ERR! node -v v14.17.6
npm ERR! gyp ERR! node-gyp -v v9.0.0
npm ERR! gyp ERR! not ok
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Administrator\.npminstall_tarball\_logs\2022-05-23T10_52_36_278Z-debug-0.log
`------------- stdout ------------
[npminstall:runscript:error] mailspring-root@0.0.1 scripts.postinstall run "node scripts/postinstall.js" error: Error [RunScriptError]: Run "C:\WINDOWS\system32\cmd.exe /d /s /c node scripts/postinstall.js" error, exit code 1
at ChildProcess.<anonymous> (C:\Users\Administrator\AppData\Roaming\npm\node_modules\cnpm\node_modules\runscript\index.js:96:21)
at ChildProcess.emit (events.js:400:28)
at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12) {
stdio: [Object],
exitcode: 1
}
× Install fail! RunScriptError: post install error, please remove node_modules before retry!
Run "C:\WINDOWS\system32\cmd.exe /d /s /c node scripts/postinstall.js" error, exit code 1
RunScriptError: Run "C:\WINDOWS\system32\cmd.exe /d /s /c node scripts/postinstall.js" error, exit code 1
at ChildProcess.<anonymous> (C:\Users\Administrator\AppData\Roaming\npm\node_modules\cnpm\node_modules\runscript\index.js:96:21)
at ChildProcess.emit (events.js:400:28)
at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
npminstall version: 6.2.0
npminstall args: D:\programs\nodejs\node.exe C:\Users\Administrator\AppData\Roaming\npm\node_modules\cnpm\node_modules\npminstall\bin\install.js --fix-bug-versions --china --userconfig=C:\Users\Administrator\.cnpmrc --disturl=https://npmmirror.com/mirrors/node --registry=https://registry.npmmirror.com
```