这是我第一次使用git,我正在尝试安装管理员管理仪表板,我遵循规则并解决问题,但现在这个问题无法解决几个小时!我很困惑,不知道该怎么办,能帮帮我吗?
- 当我输入npm install时,一切顺利,直到发生这种情况:
==> cwd: C:\Users\Zeineb\Adminator\node_modules\better-sqlite3
==> node-gyp rebuild
C:\Users\Zeineb\Adminator\node_modules\better-sqlite3>if not defined
npm_config_node_gyp (node "C:\Users\Zeineb\Adminator\node_modules\better-
sqlite3\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node
"" rebuild )
Building the projects in this solution one at a time. To enable parallel
build, please add the "/m" switch.
unpack_sqlite_dep
'python' is not recognized as an internal or external command,
operable program or batch file.
C:\Program Files
(x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(171,5):
error MSB6006: "cmd.exe" exi
ted with code 1. [C:\Users\Zeineb\Adminator\node_modules\better-
sqlite3\build\deps\action_before_build.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe`
failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit
(C:\Users\Zeineb\Adminator\node_modules\node-gyp\lib\build.js:258:23)
gyp ERR! stack at ChildProcess.emit (events.js:159:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit
(internal/child_process.js:209:12)
gyp ERR! System Windows_NT 10.0.15063
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe"
"C:\\Users\\Zeineb\\Adminator\\node_modules\\node-gyp\\bin\\node-gyp.js"
"rebuild"
gyp ERR! cwd C:\Users\Zeineb\Adminator\node_modules\better-sqlite3
gyp ERR! node -v v9.2.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
Error: exit code 1
at ChildProcess.<anonymous> (C:\Users\Zeineb\Adminator\node_modules\lzz-
gyp\lib\exec.js:19:12)
at ChildProcess.emit (events.js:159:13)
at Process.ChildProcess._handle.onexit (internal/child_process.js:209:12)
并在安装结束时写下:
npm notice created a lockfile as package-lock.json. You should commit this
file.
npm WARN postcss-html@0.11.0 requires a peer of postcss-sass@>=0.2.0 but
none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.3
(node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for
fsevents@1.1.3: wanted {"os":"darwin","arch":"any"} (current:
{"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: better-sqlite3@4.0.3
(node_modules\better-sqlite3):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: better-sqlite3@4.0.3
install: `node deps/install`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
我正在使用Windows 10,npm v 5.5.1
答案 0 :(得分:0)
解决了!!
我首先尝试通过git安装Python,它没有安装或者我做错了,因为我是git环境中的新手,所以我通过visual studio安装它,并将以下内容放入路径环境变量中:
1)C:\Python27amd64
2)C:\Python27amd64\Lib\site-packages\
3)C:\Python27amd64\Scripts
现在一切都工作得很好,感谢@TGrif让我重新检查Python的东西。