I developed an API in javascript and nodejs and now I try to run it on an Ubuntu16 Server.
The API run well on my local computer but not on the server. When I start it on the server, I have this error:
body-parser deprecated undefined extended: provide extended option
app.js:12:20 module.js:328
throw err;
^
Error: Cannot find module 'firebird'
at Function.Module._resolveFilename (module.js:326:15)
at Function.Module._load (module.js:277:25)
at Module.require (module.js:354:17)
at require (internal/module.js:12:17)
at Object. (/root/Serveur/apishopline/app.js:17:10)
at Module._compile (module.js:410:26)
at Object.Module._extensions..js (module.js:417:10)
at Module.load (module.js:344:32)
at Function.Module._load (module.js:301:12)
at Function.Module.runMain (module.js:442:10)
I have install Firebird 2.5 , nodejs v4.2.6, python v2.7.12 and npm v3.5.2 on the server.
So I have try to install the firebird module with the command line :
sudo npm install firebird
But i have this error too:
> /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libfbclient.so when
> searching for -lfbclient
> /usr/bin/ld: skipping incompatible /usr/lib/../lib/libfbclient.so when searching for -lfbclient
> /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/5/../../../libfbclient.so when searching
> for -lfbclient
> /usr/bin/ld: skipping incompatible //usr/lib/libfbclient.so when searching for -lfbclient
> /usr/bin/ld: cannot find -lfbclient
> collect2: error: ld returned 1 exit status
> binding.target.mk:133: recipe for target 'Release/obj.target/binding.node' failed
> make: *** [Release/obj.target/binding.node] Error 1
> make: Leaving directory '/root/node_modules/firebird/build'
> 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/node-gyp/lib/build.js:258:23) 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 Linux 4.4.0-93-generic gyp ERR! command
> "/usr/bin/nodejs" "/usr/local/bin/node-gyp" "rebuild" gyp ERR! cwd
> /usr/local/lib/node_modules/firebird gyp ERR! node -v v4.2.6 gyp ERR!
> node-gyp -v v3.6.2 gyp ERR! not ok npm ERR! Linux 4.4.0-93-generic
> npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "firebird"
> "-g" npm ERR! node v4.2.6 npm ERR! npm v3.5.2 npm ERR! code
> ELIFECYCLE
>
> npm ERR! firebird#0.1.1 install: `node-gyp rebuild` npm ERR! Exit
> status 1 npm ERR! npm ERR! Failed at the firebird#0.1.1 install
> script 'node-gyp rebuild'. npm ERR! Make sure you have the latest
> version of node.js and npm installed. npm ERR! If you do, this is most
> likely a problem with the firebird package, npm ERR! not with npm
> itself. npm ERR! Tell the author that this fails on your system: npm
> ERR! node-gyp rebuild npm ERR! You can get information on how to
> open an issue for this project with: npm ERR! npm bugs firebird
> npm ERR! Or if that isn't available, you can get their info via: npm
> ERR! npm owner ls firebird npm ERR! There is likely additional
> logging output above.
>
> npm ERR! Please include the following file with any support request:
> npm ERR! /root/Serveur/apishopline/npm-debug.log
You are missing the -lfbclient library. The current name and version is libfbclient2, therefore create a symklink to libfbclient.
look for libfbclient2
find /usr/ libfb | grep libfb
go to the directory where libfbclient2 is
cd /path/to/lib/
create a symlink in order to allow the script to find lfbclient
ln -s libfbclient2.so libfbclient.so
reinstall the npm modeule
npm install firebird
Related
I installed node js 13.2 and I even tried installing yarn.
In visual studio installer I ticked C++ build tools and node js msbuild.
Yet whenever I install expo-cli globally I get these error:
sharp.cc
utilities.cc
win_delay_load_hook.cc
C:\Users\uPanda\AppData\Roaming\npm\node_modules\expo-cli\node_modules\sharp\src\stats.cc(130,1): error C2661: 'v8::Obj
ect::Set': no overloaded function takes 2 arguments [C:\Users\uPanda\AppData\Roaming\npm\node_modules\expo-cli\node_mod
ules\sharp\build\sharp.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\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:210:5)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:270: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:\Users\uPanda\AppData\Roaming\npm\node_modules\expo-cli\node_modules\sharp
gyp ERR! node -v v13.2.0
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok
And this at the end:
> envsub#3.1.0 postinstall C:\Users\uPanda\AppData\Roaming\npm\node_modules\expo-cli\node_modules\envsub
> test -d .git && cp gitHookPrePush.sh .git/hooks/pre-push || true
'test' is not recognized as an internal or external command,
operable program or batch file.
'true' is not recognized as an internal or external command,
operable program or batch file.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: sharp#0.22.1 (node_modules\expo-cli\node_modules\sharp):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: sharp#0.22.1 install: `(node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! envsub#3.1.0 postinstall: `test -d .git && cp gitHookPrePush.sh .git/hooks/pre-push || true`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the envsub#3.1.0 postinstall 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\uPanda\AppData\Roaming\npm-cache\_logs\2019-12-01T12_34_33_996Z-debug.log
C:\Windows\system32>expo
internal/modules/cjs/loader.js:957
throw err;
^
I have the same problem.
OS: Win 10.
As I understood it's connected with envsub#3.1.0
The problem was fixed in new version of envsub but expo-cli still uses 3.1.0
P.S.
3.5.0 works
npm install -g expo-cli#3.5.0
Do the following:
expo init
follow the prompt.
You can either chose to install with Yarn or npm.
It works for me.
I fixed the problem, the answer is very simple :
Never Run npm With Administrator Rights
Why do I get this strange error when doing sudo npm install npm? I also sometimes get it when trying to install other modules!
Error:
> scrypt#6.0.3 preinstall /home/user/code/project/api_v0.8/node_modules/scrypt
> node node-scrypt-preinstall.js
> scrypt#6.0.3 install /home/user/code/project/api_v0.8/node_modules/scrypt
> node-gyp rebuild
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/home/user/code/project/api_v0.8/node_modules/scrypt/build'
gyp ERR! System Linux 4.20.0-042000-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/user/code/project/api_v0.8/node_modules/scrypt
gyp ERR! node -v v9.11.2
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm WARN api_v0.8#1.0.0 No repository field.
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.
What can I do, to have a clean install of my packages?
To solve this, install node version manager:
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.34.0/install.sh | bash
user node v8.15.0:
nvm install 8.15.0
nvm use 8.15.0
I'm using MacOS and is trying to install web3. I'm getting this error response message which I'm not sure how to resolve.
I have other code editors installed in my mac, and currently I'm learning how to do some blockchain development. Would be really helpful if someone could assist me in this. Thanks!
npm WARN deprecated fs-promise#2.0.3: Use mz or fs-extra^3.0 with Promise Support
npm WARN deprecated tar.gz#1.0.7: ⚠️ WARNING ⚠️ tar.gz module has been deprecated and your application is vulnerable. Please use tar module instead: https://npmjs.com/tar
> scrypt#6.0.3 preinstall /Users/HTT/inbox/node_modules/scrypt
> node node-scrypt-preinstall.js
> scrypt#6.0.3 install /Users/HTT/inbox/node_modules/scrypt
> node-gyp rebuild
gyp ERR! configure error
gyp ERR! stack Error: Python executable "/anaconda3/bin/python" is v3.6.4, which is not supported by gyp.
gyp ERR! stack You can pass the --python switch to point to Python >= v2.5.0 & < 3.0.0.
gyp ERR! stack at PythonFinder.failPythonVersion (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:492:19)
gyp ERR! stack at PythonFinder.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:474:14)
gyp ERR! stack at ChildProcess.exithandler (child_process.js:267:7)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at maybeClose (internal/child_process.js:925:16)
gyp ERR! stack at Socket.stream.socket.on (internal/child_process.js:346:11)
gyp ERR! stack at emitOne (events.js:116:13)
gyp ERR! stack at Socket.emit (events.js:211:7)
gyp ERR! stack at Pipe._handle.close [as _onclose] (net.js:567:12)
gyp ERR! System Darwin 17.5.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/HTT/inbox/node_modules/scrypt
gyp ERR! node -v v8.11.1
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN inbox#1.0.0 No description
npm WARN inbox#1.0.0 No repository field.
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! /Users/HTT/.npm/_logs/2018-04-26T14_03_17_140Z-debug.log
I fixed it by specifying the version. Not really a "fix", but working with stable releases is something I can get behind
npm install -g web3#0.20.6
I have also seen that this will do the trick
npm install ethereum/web3.js
You can use this command to check the python version :
python --version
Because you need to use node-gyp, it is recommended to install python2.7.
When run my project package, i have getting above title error, after i trying to install that packages using
npm install xml2json
but, i have getting below error only, can you pls give me suggestions or idea to get out from this issue...
D:\xampp\htdocs\podio>npm install xml2json
> node-expat#2.3.16 install D:\xampp\htdocs\podio\node_modules\node-expat
> node-gyp rebuild
D:\xampp\htdocs\podio\node_modules\node-expat>if not defined npm_config_node_gyp
(node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_mo
dules\node-gyp\bin\node-gyp.js" rebuild ) else (node "" rebuild )
Warning: Missing input files:
D:\xampp\htdocs\podio\node_modules\node-expat\build\deps\libexpat\..\..\..\deps\
libexpat\version.c
Building the projects in this solution one at a time. To enable parallel build,
please add the "/m" switch.
MSBUILD : error MSB3428: Could not load the Visual C++ component "VCBuild.exe".
To fix this, 1) install the .NET Framework 2.0 SDK, 2) install Microsoft Visua
l Studio 2005 or 3) add the location of the component to the system path if it
is installed elsewhere. [D:\xampp\htdocs\podio\node_modules\node-expat\build\b
inding.sln]
gyp ERR! build error
gyp ERR! stack Error: `C:\Windows\Microsoft.NET\Framework\v4.0.30319\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:276:23)
gyp ERR! stack at emitTwo (events.js:106:13)
gyp ERR! stack at ChildProcess.emit (events.js:191:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_proces
s.js:219:12)
gyp ERR! System Windows_NT 6.3.9600
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodej
s\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd D:\xampp\htdocs\podio\node_modules\node-expat
gyp ERR! node -v v6.11.5
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\
node_modules\\npm\\bin\\npm-cli.js" "install" "xml2json"
npm ERR! node v6.11.5
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! node-expat#2.3.16 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-expat#2.3.16 install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the node-expat package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs node-expat
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls node-expat
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! D:\xampp\htdocs\podio\npm-debug.log
Edit :: 1
After i have installed updated visual studio 2005 to 2012 im getting below error when i have run npm install xml2json and npm install xml2json --unsafe-perm,
C:\Users\Desktop\New folder\action>npm install xml2json
> node-expat#2.3.16 install C:\Users\Hoffensoft\node_modules\node-expat
> node-gyp rebuild
C:\Users\Hoffensoft\node_modules\node-expat>if not defined npm_config_node_gyp (
node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modu
les\node-gyp\bin\node-gyp.js" rebuild ) else (node "" rebuild )
Warning: Missing input files:
C:\Users\Hoffensoft\node_modules\node-expat\build\deps\libexpat\..\..\..\deps\li
bexpat\version.c
Building the projects in this solution one at a time. To enable parallel build,
please add the "/m" switch.
xmlparse.c
xmltok.c
xmlrole.c
c:\users\hoffensoft\node_modules\node-expat\deps\libexpat\lib\siphash.h(201): w
arning C4244: 'initializing' : conversion from '__int64' to 'char', possible lo
ss of data (..\..\..\deps\libexpat\lib\xmlparse.c) [C:\Users\Hoffensoft\node_mo
dules\node-expat\build\deps\libexpat\expat.vcxproj]
win_delay_load_hook.cc
expat.vcxproj -> C:\Users\Hoffensoft\node_modules\node-expat\build\Release\\l
ibexpat.lib
node-expat.cc
win_delay_load_hook.cc
C:\Users\Hoffensoft\node_modules\nan\nan.h(75): fatal error C1060: compiler is
out of heap space (..\node-expat.cc) [C:\Users\Hoffensoft\node_modules\node-exp
at\build\node_expat.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Windows\Microsoft.NET\Framework\v4.0.30319\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:276:23)
gyp ERR! stack at emitTwo (events.js:106:13)
gyp ERR! stack at ChildProcess.emit (events.js:191:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_proces
s.js:219:12)
gyp ERR! System Windows_NT 6.3.9600
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodej
s\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\Hoffensoft\node_modules\node-expat
gyp ERR! node -v v6.11.5
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\Hoffensoft\pac
kage.json'
npm WARN Hoffensoft No description
npm WARN Hoffensoft No repository field.
npm WARN Hoffensoft No README data
npm WARN Hoffensoft No license field.
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\
node_modules\\npm\\bin\\npm-cli.js" "install" "xml2json"
npm ERR! node v6.11.5
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! node-expat#2.3.16 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-expat#2.3.16 install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the node-expat package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs node-expat
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls node-expat
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\Hoffensoft\Desktop\New folder\action\npm-debug.log
Thanks in advance, Gopal R
I have solved this
Use this command npm install xml2json-light
and change let parser = require('xml2json'); to let parser = require('xml2json-light');
It worked for me
I have solved this. If you notice this part of the command else (node "" rebuild ) what I think is happening is that it is incorrectly evaluating if not defined npm_config_node_gyp as false and trying to run nothing instead of node-gyp. What you need to do is define your npm_config_node_gyp variable. You can do this like so:
export npm_config_node_gyp=<PATH_TO_NODE_GYP_PACKAGE_FOLDER> remember that Windows will need double backslashes. For me, it looked like this:
export npm_config_node_gyp=C:\\Users\\781990\\AppData\\Roaming\\nvm\\v6.11.0\\node_modules\\node-gyp
Edit:
There is another step after my fix. When executing my code, the expat bindings were missing. To fix it, add the bin folder and node-gyp executable to the npm_config_node_gyp variable and run node-gyp rebuild in the node_modules\node-expat folder. e.g.
export npm_config_node_gyp=C:\\Users\\781990\\AppData\\Roaming\\nvm\\v6.11.0\\node_modules\\node-gyp\\bin\\node-gyp.js
cd node_modules\node-expat
node-gyp rebuild
I'm trying to install a package for meteor on the command line interface, but I keep getting an error. I have tried reinstalling node and npm, but error persists. I have no idea how to proceed.
Here is the message I get in the CLI:
USERs-MacBook-Pro:meteor USER$ sudo npm -g install meteor-em
> fibers#1.0.1 install /usr/local/lib/node_modules/meteor-em/node_modules/fibers
> node ./build.js
gyp WARN EACCES user "root" does not have permission to access the dev dir "/Users/USER/.node-gyp/0.10.34"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/lib/node_modules/meteor-em/node_modules/fibers/.node-gyp"
/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py:873: Warning: 'as' will become a reserved keyword in Python 2.6
Traceback (most recent call last):
File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py", line 11, in <module>
import gyp
File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 8, in <module>
import gyp.input
File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 873
except ImportError as e:
^
SyntaxError: invalid syntax
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:343:16)
gyp ERR! stack at ChildProcess.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:820:12)
gyp ERR! System Darwin 13.4.0
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/meteor-em/node_modules/fibers
gyp ERR! node -v v0.10.34
gyp ERR! node-gyp -v v1.0.2
gyp ERR! not ok
Build failed
npm ERR! Darwin 13.4.0
npm ERR! argv "node" "/usr/local/bin/npm" "-g" "install" "meteor-em"
npm ERR! node v0.10.34
npm ERR! npm v2.1.14
npm ERR! code ELIFECYCLE
npm ERR! fibers#1.0.1 install: `node ./build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the fibers#1.0.1 install script 'node ./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
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! /Users/USER/Code/Meteor/npm-debug.log
USERs-MacBook-Pro:meteor USER$
Updates:
-Interesting detail: I was never prompted for my password
-found a discussion thread on the topic. Reading through it now:
-just installed node-gyp
-also installed node-fibers
I did an "apt-get install -y build-essential" and everything was fine after that ;-)
I just upgraded from python 2.5.4 to 2.7.9. I was told that that might help....And it did!