node-chakracore
node-chakracore copied to clipboard
When install package "sync", there is an error that the associated package "fibers" can't be installed
Repro steps:
-
Install the NVS( https://github.com/jasongin/nvs/releases ) to the machine(Win10).
-
Install the python(https://www.python.org/downloads/) .
-
Using the following instructions to install the nightly builds. nvs remote chakracore-nightly https://nodejs.org/download/chakracore-nightly/ nvs add chakracore-nightly/latest nvs use chakracore-nightly
-
Create a folder in C disk and execute “npm install sync”.
Error details:
C:\test>npm install sync
[email protected] install C:\test\node_modules\sync\node_modules\fibers node build.js || nodejs build.js
C:\test\node_modules\sync\node_modules\fibers>if not defined npm_config_node_gyp (node "C:\Program Files (x86)\nodejs\node_modules\npm\bin\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" rebuild --release ) else (rebuild --release )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
fibers.cc
coroutine.cc
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\xlocale(337): warning C4530: C++ exception handler used,
but unwind semantics are not enabled. Specify /EHsc (..\src\fibers.cc) [C:\test\node_modules\sync\node_modules\fibers
build\fibers.vcxproj]
..\src\fibers.cc(741): warning C4244: '=' : conversion from 'double' to 'size_t', possible loss of data [C:\test\node_m
odules\sync\node_modules\fibers\build\fibers.vcxproj]
..\src\coroutine.cc(138): warning C4552: '!' : operator has no effect; expected operator with side-effect [C:\test\node
_modules\sync\node_modules\fibers\build\fibers.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\vector(694): warning C4530: C++ exception handler used,
but unwind semantics are not enabled. Specify /EHsc (..\src\coroutine.cc) [C:\test\node_modules\sync\node_modules\fiber
s\build\fibers.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\vector(688) : while compiling class template m
ember function 'std::vector<void *,std::allocator<_Ty>>::vector(unsigned int)'
with
[
_Ty=void *
]
..\src\coroutine.cc(186) : see reference to function template instantiation 'std::vector<void *,std::allocato
r<_Ty>>::vector(unsigned int)' being compiled
with
[
_Ty=void *
]
c:\test\node_modules\sync\node_modules\fibers\src\coroutine.h(16) : see reference to class template instantia
tion 'std::vector<void *,std::allocator<_Ty>>' being compiled
with
[
_Ty=void *
]
coro.c
LINK : fatal error LNK1104: cannot open file 'libcpmt.lib' [C:\test\node_modules\sync\node_modules\fibers\build\fibers.
vcxproj]
gyp ERR! build error
gyp ERR! stack Error: C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:269:23)
gyp ERR! stack at ChildProcess.emit (events.js:110:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1074:12)
gyp ERR! System Windows_NT 6.3.9600
gyp ERR! command "node" "C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild" "--release"
gyp ERR! cwd C:\test\node_modules\sync\node_modules\fibers
gyp ERR! node -v v0.12.2
gyp ERR! node-gyp -v v1.0.3
gyp ERR! not ok
node-gyp exited with code: 1
Please make sure you are using a supported platform and node version. If you
would like to compile fibers on this machine please make sure you have setup your
build environment--
Windows + OS X instructions here: https://github.com/nodejs/node-gyp
Ubuntu users please run: sudo apt-get install g++ build-essential
Alpine users please run: sudo apk add python make g++
'nodejs' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\Program Files (x86)\nodejs\\node.exe" "C:\Program Files (x86)\nodejs\node_modules\npm\bin\npm-cli.js" "install" "[email protected]"
npm ERR! node v0.12.2
npm ERR! npm v2.7.4
npm ERR! code ELIFECYCLE
npm ERR! [email protected] install: node build.js || nodejs build.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node build.js || nodejs build.js'.
npm ERR! This is most likely a problem with the fibers package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node build.js || nodejs build.js
npm ERR! You can get their info via:
npm ERR! npm owner ls fibers
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request: npm ERR! C:\test\npm-debug.log
@WendyFeng01 It looks like there are a few issues here.
Issue 1
It looks like the version of npm being used belongs to an MSI-installed copy of nodejs:
C:\test\node_modules\sync\node_modules\fibers>if not defined npm_config_node_gyp (node "C:\Program Files (x86)\nodejs\node_modules\npm\bin\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" rebuild --release ) else (rebuild --release )
Compared to my build:
D:\temp\node_modules\fibers>if not defined npm_config_node_gyp (node "C:\Users\kfarnung\AppData\Local\nvs\chakracore-nightly\8.0.0-nightly20170518d07825c844\x64\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild --release ) else (node "" rebuild --release )
Issue 2
It also looks like you may be missing some of the Windows SDK files required for build as well:
LINK : fatal error LNK1104: cannot open file 'libcpmt.lib' [C:\test\node_modules\sync\node_modules\fibers\build\fibers.vcxproj]
Issue 3
Unfortunately it looks like the fibers module depends on the v8::Unlocker class which is not currently implemented in node-chakracore:
..\src\coroutine.cc(129): error C2039: 'Unlocker': is not a member of 'v8' [D:\temp\node_modules\fibers\build\fibers.vcxproj]
In order to support that module we will have to add that V8 class to our backlog and prioritize it against the other work we have.
/cc @digitalinfinity