Mat*_*tan 5 python python-2.x python-3.x npm node-gyp
我尝试使用在节点js上安装argon 2 npm install argon2 --save。我认为 python (不知道为什么)或 node-gyp 有问题。
PS C:\angular\backend> npm install argon2 --save
> argon2@0.21.0 install C:\angular\backend\node_modules\argon2
> node-gyp rebuild
C:\angular\backend\node_modules\argon2>if not defined npm_config_node_gyp (node "C:\Users\matan\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "C:\Users\matan\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
gyp ERR! configure error
gyp ERR! stack Error: Command failed: C:\Users\matan\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:\\Users\\matan\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\angular\backend\node_modules\argon2
gyp ERR! node -v v8.12.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm WARN enoent ENOENT: no such file or directory, open 'C:\angular\backend\package.json'
npm WARN backend No description
npm WARN backend No repository field.
npm WARN backend No README data
npm WARN backend No license field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! argon2@0.21.0 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the argon2@0.21.0 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\matan\AppData\Roaming\npm-cache\_logs\2019-04-30T13_02_07_305Z-debug.log
PS C:\angular\backend>
Run Code Online (Sandbox Code Playgroud)
预计安装 argon2 以便稍后用于散列。
从你的 anaconda 路径看来你正在使用 Python 3。
gyp ERR! stack Error: Command failed: C:\Users\matan\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
Run Code Online (Sandbox Code Playgroud)
这可以解释打印语句中的语法错误,因为它不是打印函数。尝试安装 python2,或者如果您已经安装了它,请确保它位于 python3 之前的路径中。
| 归档时间: |
|
| 查看次数: |
5247 次 |
| 最近记录: |