Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error during installing npm Win10 #8

Open
pavelustenko opened this issue Jun 25, 2020 · 3 comments
Open

error during installing npm Win10 #8

pavelustenko opened this issue Jun 25, 2020 · 3 comments

Comments

@pavelustenko
Copy link

pavelustenko commented Jun 25, 2020

Could not install package under Windows 10 here is npm log. Please help. Sorry for my bad English.

C:\RN\web-tty-electron>npm install --save forcefocus
npm WARN rm not removing C:\RN\web-tty-electron\node_modules\.bin\jest.cmd as it wasn't installed by C:\RN\web-tty-electron\node_modules\jest
npm WARN rm not removing C:\RN\web-tty-electron\node_modules\.bin\jest as it wasn't installed by C:\RN\web-tty-electron\node_modules\jest
npm WARN rm not removing C:\RN\web-tty-electron\node_modules\.bin\webpack.cmd as it wasn't installed by C:\RN\web-tty-electron\node_modules\webpack
npm WARN rm not removing C:\RN\web-tty-electron\node_modules\.bin\webpack as it wasn't installed by C:\RN\web-tty-electron\node_modules\webpack
npm WARN rm not removing C:\RN\web-tty-electron\node_modules\.bin\rimraf.cmd as it wasn't installed by C:\RN\web-tty-electron\node_modules\rimraf
npm WARN rm not removing C:\RN\web-tty-electron\node_modules\.bin\rimraf as it wasn't installed by C:\RN\web-tty-electron\node_modules\rimraf
npm WARN rm not removing C:\RN\web-tty-electron\node_modules\.bin\semver.cmd as it wasn't installed by C:\RN\web-tty-electron\node_modules\semver
npm WARN rm not removing C:\RN\web-tty-electron\node_modules\.bin\semver as it wasn't installed by C:\RN\web-tty-electron\node_modules\semver
npm WARN rm not removing C:\RN\web-tty-electron\node_modules\.bin\json5.cmd as it wasn't installed by C:\RN\web-tty-electron\node_modules\json5
npm WARN rm not removing C:\RN\web-tty-electron\node_modules\.bin\json5 as it wasn't installed by C:\RN\web-tty-electron\node_modules\json5

> [email protected] install C:\RN\web-tty-electron\node_modules\forcefocus
> prebuild-install || node-gyp rebuild

prebuild-install WARN install No prebuilt binaries found (target=13.11.0 runtime=node arch=x64 libc= platform=win32)

C:\RN\web-tty-electron\node_modules\forcefocus>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 )
Выполняется последовательная сборка проектов в этом решении. Чтобы включить параллельную сборку, добавьте параметр "/m".
  bindings.cc
  forcefocus_win.cc
  win_delay_load_hook.cc
c:\rn\web-tty-electron\node_modules\forcefocus\src\bindings.cc(40): error C2664: "v8::Local<v8::Value> v8::Exception::TypeError(v8::Local<v8::String>)": невозможно преоб
разовать аргумент 1 из "v8::MaybeLocal<v8::String>" в "v8::Local<v8::String>" [C:\RN\web-tty-electron\node_modules\forcefocus\build\forcefocus.vcxproj]
  c:\rn\web-tty-electron\node_modules\forcefocus\src\bindings.cc(40): note: Для выполнения данного преобразования нет доступного оператора преобразования, определенного
  пользователем, или вызов оператора невозможен
c:\rn\web-tty-electron\node_modules\forcefocus\src\bindings.cc(45): error C2440: инициализация: невозможно преобразовать "v8::MaybeLocal<v8::String>" в "v8::Local<v8::St
ring>" [C:\RN\web-tty-electron\node_modules\forcefocus\build\forcefocus.vcxproj]
  c:\rn\web-tty-electron\node_modules\forcefocus\src\bindings.cc(45): note: Ни один конструктор не смог принять исходный тип, либо разрешение перегрузки конструктора нео
  днозначно
c:\rn\web-tty-electron\node_modules\forcefocus\src\bindings.cc(50): error C2660: v8::Value::ToObject: функция не принимает 0 аргументов [C:\RN\web-tty-electron\node_modu
les\forcefocus\build\forcefocus.vcxproj]
  c:\users\adm\appdata\local\node-gyp\cache\13.11.0\include\node\v8.h(2754): note:  см. объявление "v8::Value::ToObject" (компилируется исходный файл ..\src\bindings.cc)
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:315:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
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 C:\RN\web-tty-electron\node_modules\forcefocus
gyp ERR! node -v v13.11.0
gyp ERR! node-gyp -v v5.0.7
gyp ERR! not ok
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\webpack-dev-server\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\watchpack\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\jest-haste-map\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `prebuild-install || node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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\Adm\AppData\Roaming\npm-cache\_logs\2020-06-25T12_56_19_104Z-debug.log
@chenendian
Copy link

i also have this problem, if you have answer , please @ mine

@liuyike98
Copy link

i also have this problem, if you have answer , please @ mine

重新编译一下就行了,他没有内置prebuilt你的版本
re-build it is ok

@AnEmortalKid
Copy link

In my case, I had to:

  1. Follow the instructions here
  2. Use msvs_version 2022 instead of 2017 on the configure command:
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! find VS valid versions for msvs_version:
npm ERR! gyp ERR! find VS - "2022"
npm ERR! gyp ERR! find VS - "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants