Rev*_*rcs 17 javascript node.js npm-install
我正在尝试为Exokit安装必要的依赖项,但是却收到与Python语法错误有关的错误。
这是我想尝试在浏览器中涉及VR的新内容。我已经从他们的github重新克隆了存储库,并直接从他们的网站下载了。我按照对T的指示进行操作(其中只有4个笑声)。
I have not yet touched the code and this is the error that I am getting.
Austin@DESKTOP-UD2R1O4 MINGW64 ~/exokit (master)
$ npm install
> raw-buffer@0.0.19 install C:\Users\Austin\exokit\node_modules\raw-buffer
> node-gyp rebuild
C:\Users\Austin\exokit\node_modules\raw-buffer>if not defined
npm_config_node_gyp (node "C:\Program
Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-
bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node
"C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
gyp ERR! configure error
gyp ERR! stack Error: Command failed: C:\Users\Austin\Anaconda3\python.EXE -c import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack File "<string>", line 1
gyp ERR! stack import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack ^
gyp ERR! stack SyntaxError: invalid syntax
gyp ERR! stack
gyp ERR! stack at ChildProcess.exithandler (child_process.js:276:12)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at maybeClose (internal/child_process.js:915:16)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
gyp ERR! System Windows_NT 10.0.17134
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\Austin\exokit\node_modules\raw-buffer
gyp ERR! node -v v8.12.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! raw-buffer@0.0.19 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the raw-buffer@0.0.19 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Austin\AppData\Roaming\npm-cache\_logs\2019-01-06T06_55_37_752Z-debug.log
Run Code Online (Sandbox Code Playgroud)
Kal*_*yap 15
在cmd管理员中尝试此操作(如果cmd冻结,则尝试Windows Powershell Administrator)
npm install --global Windows-build-tools
万一所提供的答案对您不起作用,请遵循以下提示,以减轻Windows OS的相关问题。
注意:如果您已经尝试通过npm命令安装构建工具而没有成功,那么在应用以下任何技巧之前,最好删除所有内容。
您可以在此处找到构建工具,然后删除文件夹(但我不知道它们是否安装在其他位置):
C:\Users\'yourUser'\.windows-build-tools\C:\Users\'yourUser'\AppData\Roaming\npm\node_modules\windows-build-tools在确保删除了上面指定的文件夹之后,您可以尝试应用以下任何技巧。
首先提示:
npm install -g node-gypnpm config set msvs_version <your msvs_version e.g. 2017>npm config set python <the path to python executable file>第二个技巧(推荐)
npm --add-python-to-path='true' install --global --production windows-build-toolsnpm config set python <the path to python executable file>,以确保npm指向python可执行文件的正确路径。C:\Users\<your_user_name>\.windows-build-tools\python27有关node-gyp的更多信息或描述,请参见:node-gyp
有关可能的Windows构建工具问题的更多信息,可以在以下链接中找到:https :
//github.com/felixrieseberg/windows-build-tools/issues/47
https://github.com/felixrieseberg/windows-build-tools /问题/ 56
附加说明:有些人的项目路径名中往往有空格,而有些工具不能很好地处理路径名中的空格。您可以在此处获取更多信息:https : //github.com/nodejs/node-gyp/issues/809
希望这能解决您的问题。
| 归档时间: |
|
| 查看次数: |
6522 次 |
| 最近记录: |