joshuawise / integer Goto Github PK
View Code? Open in Web Editor NEWNative 64-bit integers with overflow protection.
License: MIT License
Native 64-bit integers with overflow protection.
License: MIT License
After updating dependencies in my electron app I get this error when running yarn dev
:
dyld: lazy symbol binding failed: Symbol not found: __ZN2v816FunctionTemplate3NewEPNS_7IsolateEPFvRKNS_20FunctionCallbackInfoINS_5ValueEEEENS_5LocalIS4_EENSA_INS_9SignatureEEEiNS_19ConstructorBehaviorE
Referenced from: /Users/alexandergabriel/awel-personal/app/node_modules/integer/build/Release/integer.node
Expected in: flat namespace
dyld: Symbol not found: __ZN2v816FunctionTemplate3NewEPNS_7IsolateEPFvRKNS_20FunctionCallbackInfoINS_5ValueEEEENS_5LocalIS4_EENSA_INS_9SignatureEEEiNS_19ConstructorBehaviorE
Referenced from: /Users/alexandergabriel/awel-personal/app/node_modules/integer/build/Release/integer.node
Expected in: flat namespace
Seems that integer is a dependency of better-sqlite3, this extract from the yarn.lock file:
[email protected]:
version "5.3.0"
resolved "https://registry.yarnpkg.com/better-sqlite3/-/better-sqlite3-5.3.0.tgz#64b5614582886eb5e6c2becfec03d9949f1e101a"
integrity sha512-IZWjZsbS00Ys3DHeaB6WzJcJsC4SFiNP5p6doLhYfmZqGOEL84j/O2N/GjvsEmLJzTlYlBu7iVsv2CMbUPPfvg==
dependencies:
integer "^2.1.0"
tar "^4.4.6"
So maybe this happens because I updated better-sqlite3 from v5.2.1 to v5.3.0
The code example in the README shows frombits
and not fromBits
I guess the signature of node::addon_register_func
has changed. Init
in integer.cpp needs to take an extra void*. I can make it compile by adding void* dummy
as a third param.
This happens on both linux and WSL. I'm confused though because runkit has Integer apparently working fine on 12.2
CXX(target) Release/obj.target/integer/src/integer.o
../src/integer.cpp: In static member function 'static Result Integer::Cast(v8::Local<v8::String>, uint8_t)':
../src/integer.cpp:329:33: error: no matching function for call to 'v8::String::Value::Value(v8::Local<v8::String>&)'
v8::String::Value utf16(string);
^
In file included from /root/.node-gyp/12.4.0/include/node/node.h:63,
from ../src/integer.hpp:3,
from ../src/integer.cpp:1:
/root/.node-gyp/12.4.0/include/node/v8.h:3018:5: note: candidate: 'v8::String::Value::Value(v8::Isolate*, v8::Local<v8::Value>)'
Value(Isolate* isolate, Local<v8::Value> obj);
^~~~~
/root/.node-gyp/12.4.0/include/node/v8.h:3018:5: note: candidate expects 2 arguments, 1 provided
In file included from ../src/integer.hpp:3,
from ../src/integer.cpp:1:
../src/integer.cpp: At global scope:
/root/.node-gyp/12.4.0/include/node/node.h:556:43: warning: cast between incompatible function types from 'void (*)(v8::Local<v8::Object>, v8::Local<v8::Object>)' to 'node::addon_register_func' {aka 'void (*)(v8::Local<v8::Object>, v8::Local<v8::Value>, void*)'} [-Wcast-function-type]
(node::addon_register_func) (regfunc), \
^
/root/.node-gyp/12.4.0/include/node/node.h:590:3: note: in expansion of macro 'NODE_MODULE_X'
NODE_MODULE_X(modname, regfunc, NULL, 0) // NOLINT (readability/null_usage)
^~~~~~~~~~~~~
../src/integer.cpp:408:1: note: in expansion of macro 'NODE_MODULE'
NODE_MODULE(integer, Integer::Init);
^~~~~~~~~~~
In file included from /root/.node-gyp/12.4.0/include/node/node.h:63,
from ../src/integer.hpp:3,
from ../src/integer.cpp:1:
/root/.node-gyp/12.4.0/include/node/v8.h: In instantiation of 'void v8::PersistentBase<T>::SetWeak(P*, typename v8::WeakCallbackInfo<P>::Callback, v8::WeakCallbackType) [with P = node::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo<P>::Callback = void (*)(const v8::WeakCallbackInfo<node::ObjectWrap>&)]':
/root/.node-gyp/12.4.0/include/node/node_object_wrap.h:84:78: required from here
/root/.node-gyp/12.4.0/include/node/v8.h:9817:16: warning: cast between incompatible function types from 'v8::WeakCallbackInfo<node::ObjectWrap>::Callback' {aka 'void (*)(const v8::WeakCallbackInfo<node::ObjectWrap>&)'} to 'Callback' {aka 'void (*)(const v8::WeakCallbackInfo<void>&)'} [-Wcast-function-type]
reinterpret_cast<Callback>(callback), type);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make: *** [integer.target.mk:110: Release/obj.target/integer/src/integer.o] Error 1
Windows 10 Build 17763.253
Node v10.15.0
npm v6.4.1
PS C:\users\noxillio\documents\github\yum> npm i
> [email protected] install C:\users\noxillio\documents\github\yum\node_modules\integer
> node-gyp rebuild
C:\users\noxillio\documents\github\yum\node_modules\integer>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 )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
integer.cpp
win_delay_load_hook.cc
..\src\integer.cpp(370): warning C4804: '-': unsafe use of type 'bool' in operation [C:\users\noxillio\documents\github
\yum\node_modules\integer\build\integer.vcxproj]
C:\Users\Noxillio\.node-gyp\10.15.0\x64\node.lib : fatal error LNK1106: invalid file or disk full: cannot seek to 0x226
2F2 [C:\users\noxillio\documents\github\yum\node_modules\integer\build\integer.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\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:182:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:240:12)
gyp ERR! System Windows_NT 10.0.17763
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:\users\noxillio\documents\github\yum\node_modules\integer
gyp ERR! node -v v10.15.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm WARN [email protected] requires a peer of sqlite@^2.8.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of sequelize@^4.38.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of @discordjs/uws@^10.149.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of bufferutil@^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of erlpack@discordapp/erlpack but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of libsodium-wrappers@^0.7.3 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of sodium@^2.0.3 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of zlib-sync@^0.1.4 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of better-sqlite-pool@github:eslachance/better-sqlite-pool but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] No repository field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] 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\Noxillio\AppData\Roaming\npm-cache\_logs\2019-01-21T21_23_14_936Z-debug.log
The bot that using integer in nodejs v10 was working fine but when i upgraded to nodejs v12 i couldnt install the proper module.
I made sure to delete node_modules before i executed npm install
Centos 7
https://i.imgur.com/77ZUFNm.png
Compiling with clang on win10 there is an error.
clang-cl : warning : argument unused during compilation: '/Gm-' [-Wunused-command-line-argument] [F:\TEST\fotoasistent\node
_modules\better-sqlite3\node_modules\integer\bui
ld\integer.vcxproj]
..\src\integer.cpp(389,35): error : in-class initializer for static data member is not a constant expression [F:\TEST\fotoa
sistent\node_modules\better-sqlite3\node_modules
\integer\build\integer.vcxproj]
static const int64_t MIN_VALUE = -0x8000000000000000LL;
^~~~~~~~~~~~~~~~~~~~~
Compiling with ms cl there is no error.
Win7, x64
D:\app>npm i integer
> [email protected] install D:\app\node_modules\integer
> node-gyp rebuild
D:\app\node_modules\integer>if not defined npm_config_node_gyp (node "C:\Users\user\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\user\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "C:\Users\user\.windows-build-tools\python27\python.exe", you can set the PYTHON env variable.
gyp ERR! stack at PythonFinder.failNoPython (C:\Users\user\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\configure.js:484:19)
gyp ERR! stack at PythonFinder.<anonymous> (C:\Users\user\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\configure.js:509:16)
gyp ERR! stack at callback (C:\Users\user\AppData\Roaming\npm\node_modules\npm\node_modules\graceful-fs\polyfills.js:289:20)
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:153:21)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\user\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd D:\app\node_modules\integer
gyp ERR! node -v v10.16.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm WARN [email protected] No description
npm WARN [email protected] No repository field.
I know this is a common error, but should just running a VM fix this? I've tried all the other fixes and nothing worked
Have following error:
> npm install integer -dd
�[37;40mnpm info it worked if it ends with ok
�[37;40mnpm �[34;40mverb cli [ 'D:\\Program Files (x86)\\nodejs\\8.9.0\\node.exe',
�[37;40mnpm �[34;40mverb cli 'D:\\Program Files (x86)\\npm\\5.5.1\\node_modules\\npm\\bin\\npm-cli.js',
�[37;40mnpm �[34;40mverb cli 'install',
�[37;40mnpm �[34;40mverb cli 'integer',
�[37;40mnpm �[34;40mverb cli '-dd' ]
�[37;40mnpm info using [email protected]
�[37;40mnpm info using [email protected]
�[37;40mnpm �[34;40mverb npm-session 8016124db333a5c2
�[37;40mnpm �[32;40mhttp fetch GET 304 https://registry.npmjs.org/integer 283ms (from cache)
�[37;40mnpm �[34;40mverb correctMkdir D:\local\Temp\monacositeextension\temp\_locks correctMkdir not in flight; initializing
�[37;40mnpm �[34;40mverb lock using D:\local\Temp\monacositeextension\temp\_locks\staging-7ccd117e5dc1e199.lock for D:\home\site\wwwroot\node_modules\.staging
�[37;40mnpm info lifecycle [email protected]~preuninstall: [email protected]
�[37;40mnpm info lifecycle [email protected]~uninstall: [email protected]
�[37;40mnpm �[34;40mverb unbuild rmStuff [email protected] from D:\home\site\wwwroot\node_modules
�[37;40mnpm info lifecycle [email protected]~postuninstall: [email protected]
�[37;40mnpm info lifecycle [email protected]~preuninstall: [email protected]
�[37;40mnpm info lifecycle [email protected]~uninstall: [email protected]
�[37;40mnpm �[34;40mverb unbuild rmStuff [email protected] from D:\home\site\wwwroot\node_modules
�[37;40mnpm info lifecycle [email protected]~postuninstall: [email protected]
�[37;40mnpm info lifecycle [email protected]~preinstall: [email protected]
�[37;40mnpm info linkStuff [email protected]
�[37;40mnpm �[34;40mverb linkBins [email protected]
�[37;40mnpm �[34;40mverb linkMans [email protected]
�[37;40mnpm info lifecycle [email protected]~install: [email protected]
gyp info it worked if it ends with ok
gyp verb cli [ 'D:\\Program Files (x86)\\nodejs\\8.9.0\\node.exe',
gyp verb cli 'D:\\Program Files (x86)\\npm\\5.5.1\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js',
gyp verb cli 'rebuild' ]
gyp info using [email protected]
gyp info using [email protected] | win32 | ia32
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb check python checking for Python executable "python2" in the PATH
gyp verb `which` failed Error: not found: python2
gyp verb `which` failed at getNotFoundError (D:\Program Files (x86)\npm\5.5.1\node_modules\npm\node_modules\which\which.js:13:12)
gyp verb `which` failed at F (D:\Program Files (x86)\npm\5.5.1\node_modules\npm\node_modules\which\which.js:68:19)
gyp verb `which` failed at E (D:\Program Files (x86)\npm\5.5.1\node_modules\npm\node_modules\which\which.js:80:29)
gyp verb `which` failed at D:\Program Files (x86)\npm\5.5.1\node_modules\npm\node_modules\which\which.js:89:16
gyp verb `which` failed at D:\Program Files (x86)\npm\5.5.1\node_modules\npm\node_modules\which\node_modules\isexe\index.js:42:5
gyp verb `which` failed at D:\Program Files (x86)\npm\5.5.1\node_modules\npm\node_modules\which\node_modules\isexe\windows.js:36:5
gyp verb `which` failed at FSReqWrap.oncomplete (fs.js:152:21)
gyp verb `which` failed python2 { Error: not found: python2
gyp verb `which` failed at getNotFoundError (D:\Program Files (x86)\npm\5.5.1\node_modules\npm\node_modules\which\which.js:13:12)
gyp verb `which` failed at F (D:\Program Files (x86)\npm\5.5.1\node_modules\npm\node_modules\which\which.js:68:19)
gyp verb `which` failed at E (D:\Program Files (x86)\npm\5.5.1\node_modules\npm\node_modules\which\which.js:80:29)
gyp verb `which` failed at D:\Program Files (x86)\npm\5.5.1\node_modules\npm\node_modules\which\which.js:89:16
gyp verb `which` failed at D:\Program Files (x86)\npm\5.5.1\node_modules\npm\node_modules\which\node_modules\isexe\index.js:42:5
gyp verb `which` failed at D:\Program Files (x86)\npm\5.5.1\node_modules\npm\node_modules\which\node_modules\isexe\windows.js:36:5
gyp verb `which` failed at FSReqWrap.oncomplete (fs.js:152:21)
gyp verb `which` failed stack: 'Error: not found: python2\n at getNotFoundError (D:\\Program Files (x86)\\npm\\5.5.1\\node_modules\\npm\\node_modules\\which\\which.js:13:12)\n at F (D:\\Program Files (x86)\\npm\\5.5.1\\node_modules\\npm\\node_modules\\which\\which.js:68:19)\n at E (D:\\Program Files (x86)\\npm\\5.5.1\\node_modules\\npm\\node_modules\\which\\which.js:80:29)\n at D:\\Program Files (x86)\\npm\\5.5.1\\node_modules\\npm\\node_modules\\which\\which.js:89:16\n at D:\\Program Files (x86)\\npm\\5.5.1\\node_modules\\npm\\node_modules\\which\\node_modules\\isexe\\index.js:42:5\n at D:\\Program Files (x86)\\npm\\5.5.1\\node_modules\\npm\\node_modules\\which\\node_modules\\isexe\\windows.js:36:5\n at FSReqWrap.oncomplete (fs.js:152:21)',
gyp verb `which` failed code: 'ENOENT' }
gyp verb check python checking for Python executable "python" in the PATH
gyp verb `which` succeeded python D:\Python27\python.EXE
> [email protected] install D:\home\site\wwwroot\node_modules\integer
> node tools/install
D:\home\site\wwwroot\node_modules\integer>if not defined npm_config_node_gyp (node "D:\Program Files (x86)\npm\5.5.1\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "" rebuild )
gyp verb check python version `D:\Python27\python.EXE -c "import platform; print(platform.python_version());"` returned: "2.7.8\r\n"
gyp verb get node dir no --target version specified, falling back to host node version: 8.9.0
gyp verb command install [ '8.9.0' ]
gyp verb install input version string "8.9.0"
gyp verb install installing version: 8.9.0
gyp verb install --ensure was passed, so won't reinstall if already installed
gyp verb install version is already installed, need to check "installVersion"
gyp verb got "installVersion" 9
gyp verb needs "installVersion" 9
gyp verb install version is good
gyp verb get node dir target node version installed: 8.9.0
gyp verb build dir attempting to create "build" dir: D:\home\site\wwwroot\node_modules\integer\build
gyp verb build dir "build" dir needed to be created? D:\home\site\wwwroot\node_modules\integer\build
gyp verb Not using VS2017: Could not use PowerShell to find VS2017
gyp verb build/config.gypi creating config file
gyp verb build/config.gypi writing out config file: D:\home\site\wwwroot\node_modules\integer\build\config.gypi
gyp verb config.gypi checking for gypi file: D:\home\site\wwwroot\node_modules\integer\config.gypi
gyp verb common.gypi checking for gypi file: D:\home\site\wwwroot\node_modules\integer\common.gypi
gyp verb gyp gyp format was not specified; forcing "msvs"
gyp info spawn D:\Python27\python.EXE
gyp info spawn args [ 'D:\\Program Files (x86)\\npm\\5.5.1\\node_modules\\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 'D:\\home\\site\\wwwroot\\node_modules\\integer\\build\\config.gypi',
gyp info spawn args '-I',
gyp info spawn args 'D:\\Program Files (x86)\\npm\\5.5.1\\node_modules\\npm\\node_modules\\node-gyp\\addon.gypi',
gyp info spawn args '-I',
gyp info spawn args 'D:\\local\\UserProfile\\.node-gyp\\8.9.0\\include\\node\\common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=D:\\local\\UserProfile\\.node-gyp\\8.9.0',
gyp info spawn args '-Dnode_gyp_dir=D:\\Program Files (x86)\\npm\\5.5.1\\node_modules\\npm\\node_modules\\node-gyp',
gyp info spawn args '-Dnode_lib_file=D:\\local\\UserProfile\\.node-gyp\\8.9.0\\<(target_arch)\\node.lib',
gyp info spawn args '-Dmodule_root_dir=D:\\home\\site\\wwwroot\\node_modules\\integer',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'D:\\home\\site\\wwwroot\\node_modules\\integer\\build',
gyp info spawn args '-Goutput_dir=.' ]
gyp verb command build []
gyp verb build type Release
gyp verb architecture ia32
gyp verb node dev dir D:\local\UserProfile\.node-gyp\8.9.0
gyp verb found first Solution file build/binding.sln
gyp verb could not find "msbuild.exe" in PATH - finding location in registry
gyp info spawn D:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe
gyp info spawn args [ 'build/binding.sln',
gyp info spawn args '/nologo',
gyp info spawn args '/p:Configuration=Release;Platform=Win32' ]
gyp ERR! build error
gyp ERR! stack Error: `D:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (D:\Program Files (x86)\npm\5.5.1\node_modules\npm\node_modules\node-gyp\lib\build.js:258:23)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Windows_NT 6.2.9200
gyp ERR! command "D:\\Program Files (x86)\\nodejs\\8.9.0\\node.exe" "D:\\Program Files (x86)\\npm\\5.5.1\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd D:\home\site\wwwroot\node_modules\integer
gyp ERR! node -v v8.9.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
�[37;40mnpm �[34;40mverb lifecycle [email protected]~install: unsafe-perm in lifecycle true
�[37;40mnpm �[34;40mverb lifecycle [email protected]~install: PATH: D:\Program Files (x86)\npm\5.5.1\node_modules\npm\bin\node-gyp-bin;D:\home\site\wwwroot\node_modules\integer\node_modules\.bin;D:\home\site\wwwroot\node_modules\.bin;D:\Program Files (x86)\nodejs\8.9.0;D:\Program Files (x86)\Git\bin;D:\Program Files (x86)\nodejs\8.9.0;D:\Windows\system32;D:\Windows;D:\Windows\System32\Wbem;D:\Windows\System32\WindowsPowerShell\v1.0\;D:\Program Files (x86)\Git\cmd;D:\Program Files\Microsoft Network Monitor 3\;D:\Program Files (x86)\dotnet;D:\Program Files (x86)\PHP\v5.6;D:\Python27;
�[37;40mnpm �[34;40mverb lifecycle [email protected]~install: CWD: D:\home\site\wwwroot\node_modules\integer
�[37;40mnpm info lifecycle [email protected]~install: Failed to exec install script
�[37;40mnpm �[34;40mverb unlock done using D:\local\Temp\monacositeextension\temp\_locks\staging-7ccd117e5dc1e199.lock for D:\home\site\wwwroot\node_modules\.staging
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
Build started 12/11/2017 6:11:30 PM.
Project "D:\home\site\wwwroot\node_modules\integer\build\binding.sln" on node 1 (default targets).
ValidateSolutionConfiguration:
Building solution configuration "Release|Win32".
Project "D:\home\site\wwwroot\node_modules\integer\build\binding.sln" (1) is building "D:\home\site\wwwroot\node_modules\integer\build\integer.vcxproj" (2) on node 1 (default targets).
D:\home\site\wwwroot\node_modules\integer\build\integer.vcxproj(20,3): error MSB4019: The imported project "D:\Microsoft.Cpp.Default.props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
Done Building Project "D:\home\site\wwwroot\node_modules\integer\build\integer.vcxproj" (default targets) -- FAILED.
Done Building Project "D:\home\site\wwwroot\node_modules\integer\build\binding.sln" (default targets) -- FAILED.
Build FAILED.
"D:\home\site\wwwroot\node_modules\integer\build\binding.sln" (default target) (1) ->
"D:\home\site\wwwroot\node_modules\integer\build\integer.vcxproj" (default target) (2) ->
D:\home\site\wwwroot\node_modules\integer\build\integer.vcxproj(20,3): error MSB4019: The imported project "D:\Microsoft.Cpp.Default.props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:00.17
�[37;40mnpm �[34;40mverb stack Error: [email protected] install: `node tools/install`
�[37;40mnpm �[34;40mverb stack Exit status 1
�[37;40mnpm �[34;40mverb stack at EventEmitter.<anonymous> (D:\Program Files (x86)\npm\5.5.1\node_modules\npm\node_modules\npm-lifecycle\index.js:280:16)
�[37;40mnpm �[34;40mverb stack at emitTwo (events.js:126:13)
�[37;40mnpm �[34;40mverb stack at EventEmitter.emit (events.js:214:7)
�[37;40mnpm �[34;40mverb stack at ChildProcess.<anonymous> (D:\Program Files (x86)\npm\5.5.1\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
�[37;40mnpm �[34;40mverb stack at emitTwo (events.js:126:13)
�[37;40mnpm �[34;40mverb stack at ChildProcess.emit (events.js:214:7)
�[37;40mnpm �[34;40mverb stack at maybeClose (internal/child_process.js:925:16)
�[37;40mnpm �[34;40mverb stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
�[37;40mnpm �[34;40mverb stack From previous event:
�[37;40mnpm �[34;40mverb stack at runAction (D:\Program Files (x86)\npm\5.5.1\node_modules\npm\lib\install\actions.js:74:13)
�[37;40mnpm �[34;40mverb stack at actions.(anonymous function) (D:\Program Files (x86)\npm\5.5.1\node_modules\npm\lib\install\actions.js:50:17)
�[37;40mnpm �[34;40mverb stack at execAction (D:\Program Files (x86)\npm\5.5.1\node_modules\npm\lib\install\actions.js:198:18)
�[37;40mnpm �[34;40mverb stack at runCallback (timers.js:789:20)
�[37;40mnpm �[34;40mverb stack at tryOnImmediate (timers.js:751:5)
�[37;40mnpm �[34;40mverb stack at processImmediate [as _immediateCallback] (timers.js:722:5)
�[37;40mnpm �[34;40mverb stack From previous event:
�[37;40mnpm �[34;40mverb stack at withInit (D:\Program Files (x86)\npm\5.5.1\node_modules\npm\lib\install\actions.js:166:15)
�[37;40mnpm �[34;40mverb stack From previous event:
�[37;40mnpm �[34;40mverb stack at withInit (D:\Program Files (x86)\npm\5.5.1\node_modules\npm\lib\install\actions.js:182:13)
�[37;40mnpm �[34;40mverb stack at runSerial (D:\Program Files (x86)\npm\5.5.1\node_modules\npm\lib\install\actions.js:165:10)
�[37;40mnpm �[34;40mverb stack at doSerial (D:\Program Files (x86)\npm\5.5.1\node_modules\npm\lib\install\actions.js:146:3)
�[37;40mnpm �[34;40mverb stack at Array.<anonymous> (D:\Program Files (x86)\npm\5.5.1\node_modules\npm\node_modules\slide\lib\bind-actor.js:15:8)
�[37;40mnpm �[34;40mverb stack at LOOP (D:\Program Files (x86)\npm\5.5.1\node_modules\npm\node_modules\slide\lib\chain.js:15:14)
�[37;40mnpm �[34;40mverb stack at D:\Program Files (x86)\npm\5.5.1\node_modules\npm\node_modules\slide\lib\chain.js:18:7
�[37;40mnpm �[34;40mverb stack at doParallel (D:\Program Files (x86)\npm\5.5.1\node_modules\npm\lib\install\actions.js:130:30)
�[37;40mnpm �[34;40mverb stack at Array.<anonymous> (D:\Program Files (x86)\npm\5.5.1\node_modules\npm\node_modules\slide\lib\bind-actor.js:15:8)
�[37;40mnpm �[34;40mverb stack at LOOP (D:\Program Files (x86)\npm\5.5.1\node_modules\npm\node_modules\slide\lib\chain.js:15:14)
�[37;40mnpm �[34;40mverb stack at D:\Program Files (x86)\npm\5.5.1\node_modules\npm\node_modules\slide\lib\chain.js:18:7
�[37;40mnpm �[34;40mverb stack at runSerial (D:\Program Files (x86)\npm\5.5.1\node_modules\npm\lib\install\actions.js:164:30)
�[37;40mnpm �[34;40mverb stack at doSerial (D:\Program Files (x86)\npm\5.5.1\node_modules\npm\lib\install\actions.js:146:3)
�[37;40mnpm �[34;40mverb stack at Array.<anonymous> (D:\Program Files (x86)\npm\5.5.1\node_modules\npm\node_modules\slide\lib\bind-actor.js:15:8)
�[37;40mnpm �[34;40mverb stack at LOOP (D:\Program Files (x86)\npm\5.5.1\node_modules\npm\node_modules\slide\lib\chain.js:15:14)
�[37;40mnpm �[34;40mverb stack at D:\Program Files (x86)\npm\5.5.1\node_modules\npm\node_modules\slide\lib\chain.js:18:7
�[37;40mnpm �[34;40mverb stack at withInit.nodeify (D:\Program Files (x86)\npm\5.5.1\node_modules\npm\lib\install\actions.js:170:5)
�[37;40mnpm �[34;40mverb pkgid [email protected]
�[37;40mnpm �[34;40mverb cwd D:\home\site\wwwroot
�[37;40mnpm �[34;40mverb Windows_NT 6.2.9200
�[37;40mnpm �[34;40mverb argv "D:\\Program Files (x86)\\nodejs\\8.9.0\\node.exe" "D:\\Program Files (x86)\\npm\\5.5.1\\node_modules\\npm\\bin\\npm-cli.js" "install" "integer" "-dd"
�[37;40mnpm �[34;40mverb node v8.9.0
�[37;40mnpm �[34;40mverb npm v5.5.1
�[37;40mnpm �[31;40mERR! code ELIFECYCLE
�[37;40mnpm �[31;40mERR! errno 1
�[37;40mnpm �[31;40mERR! [email protected] install: `node tools/install`
�[37;40mnpm �[31;40mERR! Exit status 1
�[37;40mnpm �[31;40mERR!
�[37;40mnpm �[31;40mERR! Failed at the [email protected] install script.
�[37;40mnpm �[31;40mERR! This is probably not a problem with npm. There is likely additional logging output above.
�[37;40mnpm �[34;40mverb exit [ 1, true ]
�[37;40mnpm �[31;40mERR! A complete log of this run can be found in:
�[37;40mnpm �[31;40mERR! D:\local\Temp\monacositeextension\temp\_logs\2017-12-11T18_11_32_508Z-debug.log
Log file attached. Related to WiseLibs/better-sqlite3#84
The platform is macOS Catalina 10.15.2
node 13.6.0, npm 6.13.4
Here's the error code:
% npm install integer
[email protected] install /Users/xuezhang/cwc/cwc-integ/Sbgnviz-Collaborative-Editor/node_modules/better-sqlite3/node_modules/integer
node-gyp rebuild
CXX(target) Release/obj.target/integer/src/integer.o
../src/integer.cpp:329:21: error: no matching constructor for initialization of 'v8::String::Value'
v8::String::Value utf16(string);
^ ~~~~~~
/Users/xuezhang/Library/Caches/node-gyp/13.6.0/include/node/v8.h:3210:5: note: candidate constructor not viable: no known
conversion from 'v8::Localv8::String' to 'const v8::String::Value' for 1st argument
Value(const Value&) = delete;
^
/Users/xuezhang/Library/Caches/node-gyp/13.6.0/include/node/v8.h:3203:5: note: candidate constructor not viable: requires 2
arguments, but 1 was provided
Value(Isolate* isolate, Localv8::Value obj);
^
1 error generated.
make: *** [Release/obj.target/integer/src/integer.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: make
failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:321:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Darwin 19.2.0
gyp ERR! command "/usr/local/Cellar/node/13.6.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/xuezhang/cwc/cwc-integ/Sbgnviz-Collaborative-Editor/node_modules/better-sqlite3/node_modules/integer
gyp ERR! node -v v13.6.0
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] 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! /Users/xuezhang/.npm/_logs/2020-01-10T01_37_43_352Z-debug.log
I tried to install npm plugin integer globally with following command.
sudo npm install -g integer.
The module failed to install with error stack Error: [email protected] install: node-gyp rebuild
I am attaching the log file for reference
Thanks and regards
Sharad Kelkar
integer-install-error.log
Here is how I got integer to build. But this is short term, my project has downstream end users who will not be able to do this:
remove all node, npm, yarn, packages, global packages.
eg: /usr/local/share/.config/yarn/global/node_modules
install nvm ( https://github.com/nvm-sh/nvm )
eg:
`
append to ~/.zshrc:
export NVM_DIR="$HOME/.nvm"
[ -s "/usr/local/opt/nvm/nvm.sh" ] && . "/usr/local/opt/nvm/nvm.sh" # This loads nvm
[ -s "/usr/local/opt/nvm/etc/bash_completion" ] && . "/usr/local/opt/nvm/etc/bash_completion" # This loads nvm bash_completion
`
Install node via nvm
Hi,
I am on Windows 10 64 bit. Ill printout some more details below. I am receiving a this compiler error: https://docs.microsoft.com/en-us/cpp/error-messages/compiler-errors-1/compiler-error-c2144 on these lines: https://github.com/JoshuaWise/integer/blob/master/src/integer.cpp#L392
Here is the build log
C:\Users\Mac\WebstormProjects\foobar>npm install better-sqlite3 --save
npm WARN lifecycle The node binary used for scripts is c:\program files (x86)\nodist\bin\node.exe but npm is using C:\Program Files (x86)\Nodist\v-x64\8.9.1\node.exe itself. Use the `
--scripts-prepend-node-path` option to include the path for the node binary npm was executed with.
> [email protected] install C:\Users\Mac\WebstormProjects\foobar\node_modules\integer
> node tools/install
C:\Users\Mac\WebstormProjects\foobar\node_modules\integer>if not defined npm_config_node_gyp (node "C:\Program Files (x86)\Nodist\npmv\5.5.1\bin\node-gyp-bin\\..\..\node_modules\node-
gyp\bin\node-gyp.js" rebuild ) else (node "" rebuild )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
integer.cpp
win_delay_load_hook.cc
..\src\integer.cpp(392): error C2144: syntax error : 'double' should be preceded by ';' [C:\Users\Mac\WebstormProjects\foobar\node_modules\integer\build\integer.vcxproj]
..\src\integer.cpp(392): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int [C:\Users\Mac\WebstormProjects\foobar\node_modules\integer\build\in
teger.vcxproj]
..\src\integer.cpp(393): error C2144: syntax error : 'double' should be preceded by ';' [C:\Users\Mac\WebstormProjects\foobar\node_modules\integer\build\integer.vcxproj]
..\src\integer.cpp(393): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int [C:\Users\Mac\WebstormProjects\foobar\node_modules\integer\build\in
teger.vcxproj]
..\src\integer.cpp(393): error C2086: 'int Integer::constexpr' : redefinition [C:\Users\Mac\WebstormProjects\foobar\node_modules\integer\build\integer.vcxproj]
..\src\integer.cpp(392) : see declaration of 'Integer::constexpr'
..\src\integer.cpp(394): error C2146: syntax error : missing ';' before identifier 'uint64_t' [C:\Users\Mac\WebstormProjects\foobar\node_modules\integer\build\integer.vcxproj]
..\src\integer.cpp(394): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int [C:\Users\Mac\WebstormProjects\foobar\node_modules\integer\build\in
teger.vcxproj]
..\src\integer.cpp(394): error C2086: 'int Integer::constexpr' : redefinition [C:\Users\Mac\WebstormProjects\foobar\node_modules\integer\build\integer.vcxproj]
..\src\integer.cpp(392) : see declaration of 'Integer::constexpr'
..\src\integer.cpp(395): error C2146: syntax error : missing ';' before identifier 'uint64_t' [C:\Users\Mac\WebstormProjects\foobar\node_modules\integer\build\integer.vcxproj]
..\src\integer.cpp(395): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int [C:\Users\Mac\WebstormProjects\foobar\node_modules\integer\build\in
teger.vcxproj]
..\src\integer.cpp(395): error C2086: 'int Integer::constexpr' : redefinition [C:\Users\Mac\WebstormProjects\foobar\node_modules\integer\build\integer.vcxproj]
..\src\integer.cpp(392) : see declaration of 'Integer::constexpr'
..\src\integer.cpp(127): error C2597: illegal reference to non-static member 'Integer::U32_in_U64' [C:\Users\Mac\WebstormProjects\foobar\node_modules\integer\build\integer.vcxproj]
..\src\integer.cpp(127): error C3867: 'Integer::U32_in_U64': function call missing argument list; use '&Integer::U32_in_U64' to create a pointer to member [C:\Users\Mac\WebstormProje
cts\foobar\node_modules\integer\build\integer.vcxproj]
..\src\integer.cpp(127): error C2568: '&' : unable to resolve function overload [C:\Users\Mac\WebstormProjects\foobar\node_modules\integer\build\integer.vcxproj]
unable to recover from previous error(s); stopping compilation
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\12.0\bin\msbuild.exe` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Program Files (x86)\Nodist\npmv\5.5.1\node_modules\node-gyp\lib\build.js:258:23)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Windows_NT 10.0.16299
gyp ERR! command "C:\\Program Files (x86)\\Nodist\\v-x64\\8.9.1\\node.exe" "C:\\Program Files (x86)\\Nodist\\npmv\\5.5.1\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\Mac\WebstormProjects\foobar\node_modules\integer
gyp ERR! node -v v8.9.1
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node tools/install`
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\Mac\AppData\Roaming\npm-cache\_logs\2018-01-22T19_11_19_892Z-debug.log
C:\Users\Mac\WebstormProjects\foobar>
Is there a workaround or anything I can change to get this working?
Thanks
PS G:\Bot> npm i integer
[email protected] install G:\Bot\node_modules\integer
node-gyp rebuild
G:\Bot\node_modules\integer>if not defined npm_config_node_gyp (node "G:\Node.js files\node_modules\npm\node_modules\npm
-lifecycle\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "G:\Node.js files\node_modul
es\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.
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Platforms\Win32\PlatformToolsets\v140\Toolset.targets(34,5): err
or MSB8036: The Windows SDK version 8.1 was not found. Install the required version of Windows SDK or change the SDK ve
rsion in the project property pages or by right-clicking the solution and selecting "Retarget solution". [G:\Bot\node_m
odules\integer\build\integer.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 (G:\Node.js files\node_modules\npm\node_modules\node-gyp\lib\build.js:258:23)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Windows_NT 10.0.15063
gyp ERR! command "G:\Node.js files\node.exe" "G:\Node.js files\node_modules\npm\node_modules\node-gyp\bin\node-
gyp.js" "rebuild"
gyp ERR! cwd G:\Bot\node_modules\integer
gyp ERR! node -v v8.11.2
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN [email protected] requires a peer of bufferutil@^3.0.3 but none is installed. You must install peer dependencie
s yourself.
npm WARN [email protected] requires a peer of erlpack@discordapp/erlpack but none is installed. You must install peer de
pendencies yourself.
npm WARN [email protected] requires a peer of node-opus@^0.2.7 but none is installed. You must install peer dependencies
yourself.
npm WARN [email protected] requires a peer of opusscript@^0.0.6 but none is installed. You must install peer dependencie
s yourself.
npm WARN [email protected] requires a peer of sodium@^2.0.3 but none is installed. You must install peer dependencies yo
urself.
npm WARN [email protected] requires a peer of libsodium-wrappers@^0.7.3 but none is installed. You must install peer dep
endencies yourself.
npm WARN [email protected] requires a peer of uws@^9.14.0 but none is installed. You must install peer dependencies your
self.
npm WARN [email protected] No description
npm WARN [email protected] No repository field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] 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\vampy\AppData\Roaming\npm-cache_logs\2018-07-20T00_40_25_861Z-debug.log
So ... I'm not quite sure whats going wrong here but this is only happening when I try to intstall Integer. It's been happening for a few months now and no one knows how to help me ...
PS C:\windows\system32> npm -v
5.6.0
PS C:\windows\system32> node -v
v8.11.2
Hi there,
When attempting to install integer on macOS Catalina (10.15), it fails during the node-gyp rebuild
process.
Whilst I would assume therefor that this is most likely an issue with node-gyp in macOS Catalina at this stage during to it being a beta OS, but was wondering if anyone here knows a solution to this or if pre-built binaries could be packaged instead so that node-gyp isn't required during installation.
npm i integer
> [email protected] install /Users/mattcowley/Downloads/test/node_modules/integer
> node-gyp rebuild
make: *** No rule to make target `../../../../../../../usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi', needed by `Makefile'. Stop.
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:182:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:240:12)
gyp ERR! System Darwin 19.0.0
gyp ERR! command "/usr/local/Cellar/node/10.10.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/mattcowley/Downloads/test/node_modules/integer
gyp ERR! node -v v10.10.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm WARN [email protected] No description
npm WARN [email protected] No repository field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] 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! /Users/mattcowley/.npm/_logs/2019-06-16T13_25_50_492Z-debug.log
Hello, I've been trying to build integer on Ubuntu 18.04.1, I installed GCC and renamed it and used the POSIX version, while trying to build it, I get this error.
dbr@raze:~/DBR$ npm install better-sqlite-pool
> [email protected] install /home/dbr/DBR/node_modules/integer
> node-gyp rebuild
make: Entering directory '/home/dbr/DBR/node_modules/integer/build'
CXX(target) Release/obj.target/integer/src/integer.o
../src/integer.cpp: In static member function ‘static Result Integer::Cast(v8::Local<v8::String>, uint8_t)’:
../src/integer.cpp:329:33: warning: ‘v8::String::Value::Value(v8::Local<v8::Value>)’ is deprecated: Use Isolate version [-Wdeprecated-declarations]
v8::String::Value utf16(string);
^
In file included from /home/dbr/.node-gyp/11.4.0/include/node/v8.h:26:0,
from /home/dbr/.node-gyp/11.4.0/include/node/node.h:63,
from ../src/integer.hpp:3,
from ../src/integer.cpp:1:
/home/dbr/.node-gyp/11.4.0/include/node/v8.h:3016:51: note: declared here
V8_DEPRECATED("Use Isolate version", explicit Value(Local<v8::Value> obj));
^
/home/dbr/.node-gyp/11.4.0/include/node/v8config.h:326:3: note: in definition of macro ‘V8_DEPRECATED’
declarator __attribute__((deprecated(message)))
^~~~~~~~~~
SOLINK_MODULE(target) Release/obj.target/integer.node
g++: error: unrecognized command line option ‘-rdynamic’
integer.target.mk:132: recipe for target 'Release/obj.target/integer.node' failed
make: *** [Release/obj.target/integer.node] Error 1
make: Leaving directory '/home/dbr/DBR/node_modules/integer/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:189:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:254:12)
gyp ERR! System Linux 4.15.0-20-generic
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/dbr/DBR/node_modules/integer
gyp ERR! node -v v11.4.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm WARN [email protected] requires a peer of bufferutil@^3.0.3 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of erlpack@discordapp/erlpack but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of node-opus@^0.2.7 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of opusscript@^0.0.6 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of sodium@^2.0.3 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of libsodium-wrappers@^0.7.3 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of uws@^9.14.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of better-sqlite-pool@github:eslachance/better-sqlite-pool but none is installed. You must install peer dependencies yourself.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] 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! /home/dbr/.npm/_logs/2018-12-15T07_25_20_581Z-debug.log
Here's the version of GCC used.
dbr@raze:~/DBR$ g++ --version
g++ (GCC) 7.3-posix 20180312
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.```
I am with a error on the install of integer library.
The error is :
`
sh: 1: prebuild-install: Permission denied
Error: EACCES: permission denied, scandir '/root/test/node_modules/integer'
TypeError: Cannot read property 'get' of undefined
at errorMessage (/opt/node/lib/node_modules/npm/lib/utils/error-message.js:38:39)
at errorHandler (/opt/node/lib/node_modules/npm/lib/utils/error-handler.js:201:13)
at /opt/node/lib/node_modules/npm/bin/npm-cli.js:78:20
at cb (/opt/node/lib/node_modules/npm/lib/npm.js:225:22)
at /opt/node/lib/node_modules/npm/lib/npm.js:263:24
at /opt/node/lib/node_modules/npm/lib/config/core.js:81:7
at Array.forEach ()
at /opt/node/lib/node_modules/npm/lib/config/core.js:80:13
at f (/opt/node/lib/node_modules/npm/node_modules/once/once.js:25:25)
at /opt/node/lib/node_modules/npm/lib/config/core.js:110:20
TypeError: Cannot read property 'loaded' of undefined
at exit (/opt/node/lib/node_modules/npm/lib/utils/error-handler.js:97:27)
at process.errorHandler (/opt/node/lib/node_modules/npm/lib/utils/error-handler.js:216:3)
at process.emit (events.js:311:20)
at processPromiseRejections (internal/process/promises.js:209:33)
at processTicksAndRejections (internal/process/task_queues.js:98:32)
/opt/node/lib/node_modules/npm/lib/utils/error-handler.js:97
var doExit = npm.config.loaded ? npm.config.get('_exit') : true
^
TypeError: Cannot read property 'loaded' of undefined
at exit (/opt/node/lib/node_modules/npm/lib/utils/error-handler.js:97:27)
at process.errorHandler (/opt/node/lib/node_modules/npm/lib/utils/error-handler.js:216:3)
at process.emit (events.js:311:20)
at process._fatalException (internal/process/execution.js:164:25)
npm WARN [email protected] No description
npm WARN [email protected] No repository field.
npm ERR! code ELIFECYCLE
npm ERR! errno 7
npm ERR! [email protected] install: prebuild-install || npm run build-release
npm ERR! Exit status 7
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! /root/.npm/_logs/2020-04-07T15_43_40_535Z-debug.log
`
To reproduce the error I created a Docker file
`
FROM ubuntu
RUN mkdir /root/test
WORKDIR /root/test
RUN apt-get update
RUN apt-get -y install xz-utils wget
RUN wget https://nodejs.org/dist/v12.16.1/node-v12.16.1-linux-x64.tar.xz
RUN tar xf node-v12.16.1-linux-x64.tar.xz
RUN mv node-v12.16.1-linux-x64 /opt/node
ENV PATH="/opt/node/bin:${PATH}"
RUN rm node-v12.16.1-linux-x64.tar.xz -rf
RUN npm i -g node-gyp@latest
RUN npm init -y
RUN cat package.json
RUN npm install integer --save
`
Run it with :
docker build .
to see the error.
On the docker file I already have the npm i -g node-gyp@latest command as suggested on another issues.
I'm trying out your better-sqlite3 package, but I'm not able to install it.
I've tracked it down to this dependency on the integer
package. Whenever I npm install --save integer
I get the following output (edited the node project path):
CXX(target) Release/obj.target/integer/src/integer.o
SOLINK_MODULE(target) Release/obj.target/integer.node
COPY Release/integer.node
cp: preserving permissions for ‘Release/integer.node’: Operation not permitted
integer.target.mk:133: recipe for target 'Release/integer.node' failed
make: *** [Release/integer.node] Error 1
make: Leaving directory '/[node_project_dir]/node_modules/integer/build'
I'm using Ubuntu 16.04 with Node v6.11.4 and NPM 3.10.10.
I already checked and installed node-gyp and build-essentials, so I think I have all the requirements accounted for.
Do you have any insight you could share?
The method Integer.fromBits does not accept javascript's minus zero the same way other methods do:
Integer(-0)
Integer { high: 0, low: 0 }
Integer.fromNumber(-0)
Integer { high: 0, low: 0 }
Integer.fromString('-0')
Integer { high: 0, low: 0 }
Integer.fromBits(0, -0)
TypeError: Expected second arguement to be a regular 32-bit signed integer
The problem might be caused by the word "arguement" :-)
And thanks a lot for the excellent module 'better-sqlite3'.
D:\Project>npm install integer
[email protected] install D:\Project\node_modules\integer
node-gyp rebuild
D:\Project\node_modules\integer>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 )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
TRACKER : error TRK0005: Failed to locate: "CL.exe". The system cannot find the file specified. [D:\Project\node_modules\integer\build\integer.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\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:182:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:239:12)
gyp ERR! System Windows_NT 6.1.7601
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:\Project\node_modules\integer
gyp ERR! node -v v10.9.0
gyp ERR! node-gyp -v v3.7.0
gyp ERR! not ok
npm WARN [email protected] No repository field.
npm WARN [email protected] license should be a valid SPDX license expression
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: 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\Grant\AppData\Roaming\npm-cache_logs\2019-06-11T23_34_56_626Z-debug.log
2019-06-11T23_34_56_626Z-debug.log
So I get the error npm ERR! Failed at the [email protected] install script.
when installing quick.db. This happens to other packages rarely. This is not quick.db's fault though.
On Windows, this can be fixed with npm -g --add-python-to-path install windows-build-tools node-gyp
, but since I'm on Ubuntu (VPS) I cannot. Does someone know the answer?
This is my debug:
2018-06-01T19_31_52_541Z-debug.log
`root@v1770:/home/jackal# npm install --save better-sqlite3
[email protected] install /home/node_modules/integer
prebuild-install || npm run build-release
prebuild-install WARN install No prebuilt binaries found (target=13.11.0 runtime=node arch=x64 libc= platform=linux)
[email protected] build-release /home/node_modules/integer
node-gyp rebuild --release
make: Entering directory '/home/node_modules/integer/build'
CXX(target) Release/obj.target/integer/src/integer.o
In file included from ../src/integer.hpp:3,
from ../src/integer.cpp:1:
/root/.cache/node-gyp/13.11.0/include/node/node.h:618:43: warning: cast between incompatible function types from ‘void ()(v8::Localv8::Object, v8::Localv8::Object)’ to ‘node::addon_register_func’ {aka ‘void ()(v8::Localv8::Object, v8::Localv8::Value, void*)’} [-Wcast-function-type]
618 | (node::addon_register_func) (regfunc),
| ^
/root/.cache/node-gyp/13.11.0/include/node/node.h:652:3: note: in expansion of macro ‘NODE_MODULE_X’
652 | NODE_MODULE_X(modname, regfunc, NULL, 0) // NOLINT (readability/null_usage)
| ^~~~~~~~~~~~~
../src/integer.cpp:408:1: note: in expansion of macro ‘NODE_MODULE’
408 | NODE_MODULE(integer, Integer::Init);
| ^~~~~~~~~~~
g++: fatal error: Killed signal terminated program cc1plus
compilation terminated.
make: *** [integer.target.mk:114: Release/obj.target/integer/src/integer.o] Error 1
make: Leaving directory '/home/node_modules/integer/build'
gyp ERR! build error
gyp ERR! stack Error: make
failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/lib/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 Linux 5.3.0-24-generic
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--release"
gyp ERR! cwd /home/node_modules/integer
gyp ERR! node -v v13.11.0
gyp ERR! node-gyp -v v5.0.7
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build-release: node-gyp rebuild --release
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build-release script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2020-03-25T17_50_47_234Z-debug.log
npm WARN [email protected] requires a peer of better-sqlite3@^5.4.1 but none is installed. You must install peer dependencies yourself.
npm WARN home No description
npm WARN home No repository field.
npm WARN home No license field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: prebuild-install || npm run build-release
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! /root/.npm/_logs/2020-03-25T17_50_47_492Z-debug.log`
Can't install better-sqlite3
Running npm update
on a fresh new directory environment with no node_modules directory, the installation process fails with this package "integer"
I recently updated my ArchLinux system environment to now using npm v6.10.2 and node v12.9.0
Here is my package.json file: http://dpaste.com/3B376PF.txt
It could be great if this module could provide binaries to avoid build on install, such as node-sass does.
Downloading binary from https://github.com/sass/node-sass/releases/download/v4.9.3/linux-x64-57_binding.node
Download complete ] - :
Binary saved to /home/user/dev/myproject/node_modules/node-sass/vendor/linux-x64-57/binding.node
Caching binary to /home/user/.npm/node-sass/4.9.3/linux-x64-57_binding.node
Most issues of integer are about difficulties to install it, this could solve this frequent problem.
Here are the binaries that should be provided:
For other architectures, there is still node-gyp.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.