Closed carlosdelfino closed 8 years ago
Microsoft Windows [versão 10.0.10586]
(c) 2015 Microsoft Corporation. Todos os direitos reservados.
c:\Users\consu_000\GitBook\Library\cursoarduino\introducao-a-linguagem-de-programacao>node-gyp
'node-gyp' não é reconhecido como um comando interno
ou externo, um programa operável ou um arquivo em lotes.
c:\Users\consu_000\GitBook\Library\cursoarduino\introducao-a-linguagem-de-programacao>npm install -g node-gyp
C:\Users\consu_000\AppData\Roaming\npm\node-gyp -> C:\Users\consu_000\AppData\Roaming\npm\node_modules\node-gyp\bin\node-gyp.js
node-gyp@3.4.0 C:\Users\consu_000\AppData\Roaming\npm\node_modules\node-gyp
├── graceful-fs@4.1.4
├── rimraf@2.5.3
├── semver@5.2.0
├── osenv@0.1.3 (os-tmpdir@1.0.1, os-homedir@1.0.1)
├── nopt@3.0.6 (abbrev@1.0.9)
├── fstream@1.0.10 (inherits@2.0.1)
├── which@1.2.10 (isexe@1.1.2)
├── tar@2.2.1 (inherits@2.0.1, block-stream@0.0.9)
├── minimatch@3.0.2 (brace-expansion@1.1.5)
├── glob@7.0.5 (path-is-absolute@1.0.0, fs.realpath@1.0.0, inherits@2.0.1, once@1.3.3, inflight@1.0.5)
├── mkdirp@0.5.1 (minimist@0.0.8)
├── npmlog@3.1.2 (set-blocking@2.0.0, console-control-strings@1.1.0, are-we-there-yet@1.1.2, gauge@2.6.0)
├── request@2.72.0 (aws-sign2@0.6.0, tunnel-agent@0.4.3, forever-agent@0.6.1, oauth-sign@0.8.2, is-typedarray@1.0.0, caseless@0.11.0, stringstream@0.0.5, aws4@1.4.1, isstream@0.1.2, json-stringify-safe@5.0.1, extend@3.0.0, tough-cookie@2.2.2, node-uuid@1.4.7, qs@6.1.0, combined-stream@1.0.5, mime-types@2.1.11, form-data@1.0.0-rc4, bl@1.1.2, hawk@3.1.3, http-signature@1.1.1, har-validator@2.0.6)
└── path-array@1.0.1 (array-index@1.0.0)
c:\Users\consu_000\GitBook\Library\cursoarduino\introducao-a-linguagem-de-programacao>
c:\Users\consu_000\GitBook\Library\cursoarduino\introducao-a-linguagem-de-programacao>node-gyp rebuild
gyp info it worked if it ends with ok
gyp info using node-gyp@3.4.0
gyp info using node@4.4.7 | win32 | x64
gyp info spawn C:\Python27\python.exe
gyp info spawn args [ 'C:\\Users\\consu_000\\AppData\\Roaming\\npm\\node_modules\\node-gyp\\gyp\\gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'msvs',
gyp info spawn args '-G',
gyp info spawn args 'msvs_version=auto',
gyp info spawn args '-I',
gyp info spawn args 'c:\\Users\\consu_000\\GitBook\\Library\\cursoarduino\\introducao-a-linguagem-de-programacao\\build\\config.gypi',
gyp info spawn args '-I',
gyp info spawn args 'C:\\Users\\consu_000\\AppData\\Roaming\\npm\\node_modules\\node-gyp\\addon.gypi',
gyp info spawn args '-I',
gyp info spawn args 'C:\\Users\\consu_000\\.node-gyp\\4.4.7\\include\\node\\common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=C:\\Users\\consu_000\\.node-gyp\\4.4.7',
gyp info spawn args '-Dnode_gyp_dir=C:\\Users\\consu_000\\AppData\\Roaming\\npm\\node_modules\\node-gyp',
gyp info spawn args '-Dnode_lib_file=node.lib',
gyp info spawn args '-Dmodule_root_dir=c:\\Users\\consu_000\\GitBook\\Library\\cursoarduino\\introducao-a-linguagem-de-programacao',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'c:\\Users\\consu_000\\GitBook\\Library\\cursoarduino\\introducao-a-linguagem-de-programacao\\build',
gyp info spawn args '-Goutput_dir=.' ]
gyp: binding.gyp not found (cwd: c:\Users\consu_000\GitBook\Library\cursoarduino\introducao-a-linguagem-de-programacao) while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (C:\Users\consu_000\AppData\Roaming\npm\node_modules\node-gyp\lib\configure.js:305:16)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Windows_NT 10.0.10586
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\consu_000\\AppData\\Roaming\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd c:\Users\consu_000\GitBook\Library\cursoarduino\introducao-a-linguagem-de-programacao
gyp ERR! node -v v4.4.7
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
c:\Users\consu_000\GitBook\Library\cursoarduino\introducao-a-linguagem-de-programacao>
I tried this tutorial: https://github.com/Automattic/node-canvas/wiki/Installation---Windows
and it did not work, nothing changes.
I tried this option as well, using Visual Studio 2015: https://github.com/nodejs/node-gyp#installation
All my software is licensed with academic versions of my name through the Spark Dreams.
To get around the __pfnDliNotifyHook2
error you need to build with node-gyp@3.4.0
. This error:
gyp: binding.gyp not found (cwd: c:\Users\consu_000\GitBook\Library\cursoarduino\introducao-a-linguagem-de-programacao) while trying to load binding.gyp
Means you're running node-gyp build
or node-gyp rebuild
in the wrong directory. binding.gyp is provided by the add-on and is normally in its top-level directory. Good luck!
Hello @bnoordhuis, what would be the correct directory to be executed in this case?
I've tried as said following several tutorials, and have tried to create the binding.gyp, the problem occurs when trying to install plugins for gitbook, and when trying to install node-gyp alone or when you install the canvas.
I'm not a connoisseur of Node-JS, can even turn out to be, but my goal is to just use the gitbook per hour, please give me a more precise guidance on how to solve the problem?
Grateful.
If you have the source of the add-on checked out, it's usually the top-level directory. If you're trying to install an add-on through npm, you need to ensure that npm uses the right node-gyp version.
I believe npm v2.15.9 comes with node-gyp v3.4.0. It looks like you're using v2.15.8.
Thanks for the answer.
I am new to node.js and tools, right now I'm just using to install gitbook, I intend to in the future estua it better, even to be able to contribute much to the gitbook as the Jekyll.
I tried to install another version cited, but it did not work, what to do step by step to correct this problem?
C:\temp>npm install -g node-gyp@2.15.8
npm ERR! Windows_NT 10.0.10586
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "node-gyp@2.15.8"
npm ERR! node v4.4.7
npm ERR! npm v2.15.8
npm ERR! version not found: node-gyp@2.15.8
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
npm ERR! Please include the following file with any support request:
npm ERR! C:\temp\npm-debug.log
Thank you.
npm install -g node-gyp@2.15.8
should read npm install -g npm@2.15.9
- you want to update all of npm, not just node-gyp.
Well, I could not install the 2.15.8 version because it does not exist, but had success with 2.0.0 and so I was trying the version according to the list below and succeeded to the current version.
"2.0.0","2.0.1","2.0.2","3.0.0","3.0.1","3.0.2","3.0.3","3.1.0","3.2.0","3.2.1","3.3.0","3.3.1","3.4.0"
I did the process:
npm uninstall -g node-gyp
npm install -g node-gyp@versaolista
npm install -g canvas
and finally it worked.
Thanks for the help, so decide what must remove it and test in a virtual machine and document in my language, post a tutorial on my public site.
Grateful.
On Ubuntu 14.04 I tried successfully:
npm uninstall -g node-gyp
sudo npm install -g node-gyp@3.4.0 --save
npm install -g canvas --save
i'm getting the same type cast error on windows 10 with npm@3.7.5 and node-gyp@3.5.0.:
C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\src\win_delay_load_hook.c(31): warning
C4055: 'type cast': from data pointer 'HMODULE' to function pointer 'FARPROC' [c:\Program Files\node
_modules\canvas\build\canvas.vcxproj]
updating npm to 4.1.1 seems to have fixed the issue.
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 (E:\Dev\nodejs\installationdir\node_modules\npm\node_modules\node-gyp\lib\build.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:210:5)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Windows_NT 10.0.18363
gyp ERR! command "E:\Dev\nodejs\installationdir\node.exe" "E:\Dev\nodejs\installationdir\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd E:\Dev\OpenSource\Gssoc2020\BlogMan\back-end\node_modules\recommender
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok
npm WARN back-end@1.0.0 No description
npm WARN back-end@1.0.0 No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.2 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! recommender@3.0.0 install: node-gyp rebuild
npm ERR!
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\Abir\AppData\Roaming\npm-cache_logs\2020-03-28T15_34_07_302Z-debug.log
PS E:\Dev\OpenSource\Gssoc2020\BlogMan\back-end> node-gyp -v
node-gyp : The term 'node-gyp' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that
the path is correct and try again.
+ CategoryInfo : ObjectNotFound: (node-gyp:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
6.13.4 PS E:\Dev\OpenSource\Gssoc2020\BlogMan\back-end> npm uninstall -g node-gyp up to date in 0.036s PS E:\Dev\OpenSource\Gssoc2020\BlogMan\back-end> npm install -g node-gyp@versaolista npm ERR! code ETARGET npm ERR! notarget No matching version found for node-gyp@versaolista. npm ERR! notarget In most cases you or one of your dependencies are requesting npm ERR! notarget a package version that doesn't exist.
npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\Abir\AppData\Roaming\npm-cache_logs\2020-03-28T15_37_23_234Z-debug.log PS E:\Dev\OpenSource\Gssoc2020\BlogMan\back-end> npm install -g node-gyp@3.4.0 --save npm WARN deprecated mkdirp@0.5.4: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.) npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142 C:\Users\Abir\AppData\Roaming\npm\node-gyp -> C:\Users\Abir\AppData\Roaming\npm\node_modules\node-gyp\bin\node-gyp.js
recommender@3.0.0 install C:\Users\Abir\AppData\Roaming\npm\node_modules\recommender node-gyp rebuild
C:\Users\Abir\AppData\Roaming\npm\node_modules\recommender>if not defined npm_config_node_gyp (node "E:\Dev\nodejs\installationdir\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "E:\Dev\nodejs\installationdir\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
recommender_node.cpp
recommender.cpp
Utils.cpp
win_delay_load_hook.cc
c:\users\abir\appdata\roaming\npm\node_modules\recommender\src\workers\collaborativefilteringworker.cpp(24): warning C4996: 'Nan::Callback::Call': was declared deprecated (compiling source f
ile ..\recommender_node.cpp) [C:\Users\Abir\AppData\Roaming\npm\node_modules\recommender\build\recommender.vcxproj]
c:\users\abir\appdata\roaming\npm\node_modules\recommender\node_modules\nan\nan.h(1740): note: see declaration of 'Nan::Callback::Call' (compiling source file ..\recommender_node.cpp)
c:\users\abir\appdata\roaming\npm\node_modules\recommender\src\workers\topcfrecommendationsworker.cpp(28): warning C4996: 'v8::Object::Set': was declared deprecated (compiling source file ..
\recommender_node.cpp) [C:\Users\Abir\AppData\Roaming\npm\node_modules\recommender\build\recommender.vcxproj]
c:\users\abir\appdata\local\node-gyp\cache\12.14.0\include\node\v8.h(3402): note: see declaration of 'v8::Object::Set' (compiling source file ..\recommender_node.cpp)
c:\users\abir\appdata\roaming\npm\node_modules\recommender\src\workers\topcfrecommendationsworker.cpp(29): warning C4996: 'v8::Object::Set': was declared deprecated (compiling source file ..
\recommender_node.cpp) [C:\Users\Abir\AppData\Roaming\npm\node_modules\recommender\build\recommender.vcxproj]
c:\users\abir\appdata\local\node-gyp\cache\12.14.0\include\node\v8.h(3402): note: see declaration of 'v8::Object::Set' (compiling source file ..\recommender_node.cpp)
c:\users\abir\appdata\roaming\npm\node_modules\recommender\src\workers\topcfrecommendationsworker.cpp(34): warning C4996: 'Nan::Callback::Call': was declared deprecated (compiling source fil
e ..\recommender_node.cpp) [C:\Users\Abir\AppData\Roaming\npm\node_modules\recommender\build\recommender.vcxproj]
c:\users\abir\appdata\roaming\npm\node_modules\recommender\node_modules\nan\nan.h(1740): note: see declaration of 'Nan::Callback::Call' (compiling source file ..\recommender_node.cpp)
c:\users\abir\appdata\roaming\npm\node_modules\recommender\src\workers\tfidffilesworker.cpp(33): warning C4996: 'Nan::Callback::Call': was declared deprecated (compiling source file ..\recom
mender_node.cpp) [C:\Users\Abir\AppData\Roaming\npm\node_modules\recommender\build\recommender.vcxproj]
c:\users\abir\appdata\roaming\npm\node_modules\recommender\node_modules\nan\nan.h(1740): note: see declaration of 'Nan::Callback::Call' (compiling source file ..\recommender_node.cpp)
c:\users\abir\appdata\roaming\npm\node_modules\recommender\src\workers\tfidfarraysworker.cpp(32): warning C4996: 'Nan::Callback::Call': was declared deprecated (compiling source file ..\reco
mmender_node.cpp) [C:\Users\Abir\AppData\Roaming\npm\node_modules\recommender\build\recommender.vcxproj]
c:\users\abir\appdata\roaming\npm\node_modules\recommender\node_modules\nan\nan.h(1740): note: see declaration of 'Nan::Callback::Call' (compiling source file ..\recommender_node.cpp)
c:\users\abir\appdata\roaming\npm\node_modules\recommender\recommender_node.cpp(15): error C2661: 'v8::Value::ToString': no overloaded function takes 0 arguments [C:\Users\Abir\AppData\Roami
ng\npm\node_modules\recommender\build\recommender.vcxproj]
c:\users\abir\appdata\roaming\npm\node_modules\recommender\recommender_node.cpp(15): error C2512: 'v8::String::Utf8Value::Utf8Value': no appropriate default constructor available [C:\Users\A
bir\AppData\Roaming\npm\node_modules\recommender\build\recommender.vcxproj]
c:\users\abir\appdata\roaming\npm\node_modules\recommender\recommender_node.cpp(37): error C2661: 'v8::Value::ToString': no overloaded function takes 0 arguments [C:\Users\Abir\AppData\Roami
ng\npm\node_modules\recommender\build\recommender.vcxproj]
c:\users\abir\appdata\roaming\npm\node_modules\recommender\recommender_node.cpp(37): error C2512: 'v8::String::Utf8Value::Utf8Value': no appropriate default constructor available [C:\Users\A
bir\AppData\Roaming\npm\node_modules\recommender\build\recommender.vcxproj]
c:\users\abir\appdata\roaming\npm\node_modules\recommender\recommender_node.cpp(49): warning C4996: 'Nan::Callback::Call': was declared deprecated [C:\Users\Abir\AppData\Roaming\npm\node_mod
ules\recommender\build\recommender.vcxproj]
c:\users\abir\appdata\roaming\npm\node_modules\recommender\node_modules\nan\nan.h(1740): note: see declaration of 'Nan::Callback::Call'
c:\users\abir\appdata\roaming\npm\node_modules\recommender\recommender_node.cpp(55): warning C4996: 'Nan::Callback::Call': was declared deprecated [C:\Users\Abir\AppData\Roaming\npm\node_mod
ules\recommender\build\recommender.vcxproj]
c:\users\abir\appdata\roaming\npm\node_modules\recommender\node_modules\nan\nan.h(1740): note: see declaration of 'Nan::Callback::Call'
c:\users\abir\appdata\roaming\npm\node_modules\recommender\recommender_node.cpp(68): error C2660: 'v8::Value::NumberValue': function does not take 0 arguments [C:\Users\Abir\AppData\Roaming\
npm\node_modules\recommender\build\recommender.vcxproj]
c:\users\abir\appdata\local\node-gyp\cache\12.14.0\include\node\v8.h(2608): note: see declaration of 'v8::Value::NumberValue' (compiling source file ..\recommender_node.cpp)
c:\users\abir\appdata\roaming\npm\node_modules\recommender\recommender_node.cpp(82): error C2661: 'v8::Object::GetOwnPropertyNames': no overloaded function takes 0 arguments [C:\Users\Abir\A
ppData\Roaming\npm\node_modules\recommender\build\recommender.vcxproj]
c:\users\abir\appdata\roaming\npm\node_modules\recommender\recommender_node.cpp(83): warning C4018: '<': signed/unsigned mismatch [C:\Users\Abir\AppData\Roaming\npm\node_modules\recommender\
build\recommender.vcxproj]
c:\users\abir\appdata\roaming\npm\node_modules\recommender\recommender_node.cpp(85): error C2661: 'v8::Value::ToString': no overloaded function takes 0 arguments [C:\Users\Abir\AppData\Roami
ng\npm\node_modules\recommender\build\recommender.vcxproj]
c:\users\abir\appdata\roaming\npm\node_modules\recommender\recommender_node.cpp(85): error C2512: 'v8::String::Utf8Value::Utf8Value': no appropriate default constructor available [C:\Users\A
bir\AppData\Roaming\npm\node_modules\recommender\build\recommender.vcxproj]
c:\users\abir\appdata\roaming\npm\node_modules\recommender\recommender_node.cpp(90): error C2660: 'v8::Value::NumberValue': function does not take 0 arguments [C:\Users\Abir\AppData\Roaming\
npm\node_modules\recommender\build\recommender.vcxproj]
Are two days that I try to install the canvas to use with gitbook, I tried in every way, I've read many tutorials on the web, already removed and reinstalled node.js, python 2.7, GTK2 Microsoft Visual Studio Community.
But solves nothing and still keep getting the following message when trying to install the canvas, I tried to install node-gyp alone and has followed several tutorials, but solves nothing.
Here is what I get from the canvas when trying to install it if you can guide me step by step, I will be happy to follow, and I think it can be useful for many, as I see it is a very common problem.
Thank you so much.