Я работаю над проектом с React. Папка node_modules была удалена по незнанию, поэтому я пытался восстановить ее, снова запустив npm install
.
На этом шаге, однако, устанавливаются некоторые пакеты, и где-то появляется эта ошибка ниже. Я использовал несколько доступных вариантов, таких как this и this , но все же я не могу обойти это.
- Версия узла: v10. 16.3
- npm версия: 6.9.0
Это вывод ошибки:
D:\Projects\ReactJsProjects\portal_app>workon projects
(projects) D:\Projects\ReactJsProjects\portal_app>npm install
> scrypt@6.0.3 preinstall D:\Projects\ReactJsProjects\portal_app\node_modules\scrypt
> node node-scrypt-preinstall.js
> websocket@git://github.com/frozeman/WebSocket-Node.git#6c72925e3f8aaaea8dc8450f97627e85263999f2 install D:\Projects\ReactJsProjects\portal_app\node_modules\@makerdao\dai\node_modules\websocket
> (node-gyp rebuild 2> builderror.log) || (exit 0)
(projects) D:\Projects\ReactJsProjects\portal_app\node_modules\@makerdao\dai\node_modules\websocket>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 )
> scrypt@6.0.3 install D:\Projects\ReactJsProjects\portal_app\node_modules\scrypt
> node-gyp rebuild
(projects) D:\Projects\ReactJsProjects\portal_app\node_modules\scrypt>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\Bob\Envs\projects\Scripts\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:294:12)
gyp ERR! stack at ChildProcess.emit (events.js:198:13)
gyp ERR! stack at maybeClose (internal/child_process.js:982:16)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
gyp ERR! System Windows_NT 10.0.18362
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 D:\Projects\ReactJsProjects\portal_app\node_modules\scrypt
gyp ERR! node -v v10.16.3
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm WARN @typescript-eslint/eslint-plugin@1.13.0 requires a peer of eslint@^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN @typescript-eslint/parser@1.13.0 requires a peer of eslint@^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN eslint-config-react-app@5.0.1 requires a peer of eslint-plugin-react-hooks@1.x but none is installed. You must install peer dependencies yourself.
npm WARN eth-eip712-util@2.3.0 requires a peer of bn.js@^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN eth-eip712-util@2.3.0 requires a peer of keccak@^2.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN ts-pnp@1.1.2 requires a peer of typescript@* but none is installed. You must install peer dependencies yourself.
npm WARN tsutils@3.17.1 requires a peer of typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta but none is installed. You must install peer dependencies yourself.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! scrypt@6.0.3 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the scrypt@6.0.3 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\Bob\AppData\Roaming\npm-cache\_logs\2019-11-05T11_25_30_954Z-debug.log