npm MongoDB package installation fails on Windows - windows

It says that it's "Not compatible with your operating system or architecture: mongo
db#0.9.8". Any ideas? (I have mongo installed and it runs fine)
C:\www\webhookit>npm install mongodb
npm WARN package.json ejs#0.6.1 No repository field.
npm WARN package.json webhookit-comment#0.0.3 No README data
npm WARN package.json webhookit-ejs#0.0.3 No README data
npm WARN package.json webhookit-http#0.0.5 No README data
npm WARN package.json webhookit-jsonparse#0.0.2 No README data
npm WARN package.json webhookit-objectbuilder#0.0.3 No README data
npm WARN package.json webhookit-jsonpath#0.0.3 No README data
npm WARN package.json webhookit-xml2js#0.0.2 No README data
npm ERR! notsup Unsupported
npm ERR! notsup Not compatible with your operating system or architecture: mongo
db#0.9.8
npm ERR! notsup Valid OS: linux,darwin,freebsd
npm ERR! notsup Valid Arch: any
npm ERR! notsup Actual OS: win32
npm ERR! notsup Actual Arch: ia32
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files (x86)\\nodejs\\\\node.exe" "C:\\Program File
s (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "mongodb"
npm ERR! cwd C:\www\webhookit
npm ERR! node -v v0.10.31
npm ERR! npm -v 1.4.23
npm ERR! code EBADPLATFORM
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! C:\www\webhookit\npm-debug.log
npm ERR! not ok code 0

The package.json of webhookit explicitly states the OS "os": ["darwin", "linux"],
Hence you get the error message
npm ERR! notsup Valid OS: linux,darwin,freebsd
npm ERR! notsup Actual OS: win32
Perhaps you can safely remove that line and the webhookit still function normally without such restriction of OS?

Related

Package cairo not found in pakg-config search path

sachin#sachin-Inspiron-15-3567:~/Desktop/Projects/api.ohphish.com$ npm install
npm WARN read-shrinkwrap This version of npm is compatible with lockfileVersion#1, but npm-shrinkwrap.json was generated for lockfileVersion#0. I'll try to do my best with it!
npm WARN read-shrinkwrap This version of npm is compatible with lockfileVersion#1, but npm-shrinkwrap.json was generated for lockfileVersion#0. I'll try to do my best with it!
npm WARN read-shrinkwrap This version of npm is compatible with lockfileVersion#1, but npm-shrinkwrap.json was generated for lockfileVersion#0. I'll try to do my best with it!
npm WARN read-shrinkwrap This version of npm is compatible with lockfileVersion#1, but npm-shrinkwrap.json was generated for lockfileVersion#0. I'll try to do my best with it!
canvas#1.6.13 install /home/sachin/Desktop/Projects/api.ohphish.com/node_modules/chartjs-node/node_modules/canvas
node-gyp rebuild
Package cairo was not found in the pkg-config search path.
Perhaps you should add the directory containing cairo.pc' to the PKG_CONFIG_PATH environment variable No package 'cairo' found gyp: Call to './util/has_lib.sh freetype' returned exit status 0 while in binding.gyp. 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 (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16)
gyp ERR! stack at ChildProcess.emit (events.js:315:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
gyp ERR! System Linux 5.4.0-42-generic
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 /home/sachin/Desktop/Projects/api.ohphish.com/node_modules/chartjs-node/node_modules/canvas
gyp ERR! node -v v14.15.4
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
npm WARN chartjs-node#1.7.1 requires a peer of chart.js#<=2.7.* but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#2.3.1 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#2.3.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! canvas#1.6.13 install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the canvas#1.6.13 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
I installed dev dependencies by issueing command.
sudo apt-get install libcairo2-dev libjpeg-dev libgif-dev build-essential

Cannot install expo-cli

my expo cli has stopped working and now I am unable to run:
npm start
This prompts me to install expo-cli globally and when I do I get this Error Message:
npm ERR! code EBADPLATFORM
npm ERR! notsup Unsupported platform for #expo/ngrok-bin-win32-x64#2.2.8-beta.1: wanted {"os":"win32","arch":"x64"} (current: {"os":"darwin","arch":"x64"})
npm ERR! notsup Valid OS: win32
npm ERR! notsup Valid Arch: x64
npm ERR! notsup Actual OS: darwin
npm ERR! notsup Actual Arch: x64
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/steven/.npm/_logs/2020-09-14T13_42_30_485Z-debug.log
I really need expo-cli to work for work purposes. Please help me!
Try running the npm doctor command to check if there's any missing dependency:
npm doctor
or you could install expo using the Yarn command:
yarn global add expo-cli

when i am trying to install npm install gulp -D in cmd prompt there many errors displaying

node verison:v12.4.0
npm verison:6.13.4
laravel:5.8
Build failed with error code: 1
npm WARN The package popper.js is included as both a dev and production depende
cy.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.7 (node_modules\fs
vents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents
1.2.7: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"
)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass#4.11.0 postinstall: node scripts/build.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass#4.11.0 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional lo
ging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\CLOUD TIMON\AppData\Roaming\npm-cache_logs\2019-12-31T05
00_45_654Z-debug.log
first try to clean npm cache with :
npm cache clean --force
then delete node_modules folder completely, then again run npm install.
that should solve the problem.

Windows 10 - Failed at the #angular/cli#8.2.2 postinstall script

I cannot get Angular CLI installed on a new Windows 10 machine at all.
I have cleared node cache. I have uninstalled and re-installed node via every method including chocolatey. I have edited the npmrc to change the default location of node modules... everything I can find
$ npm install #angular/cli
#angular/cli#8.2.2 postinstall C:\sandbox\ang\node_modules#angular\cli
node ./bin/postinstall/script.js
npm WARN enoent ENOENT: no such file or directory, open 'C:\sandbox\ang\package.json'
npm WARN ang No description
npm WARN ang No repository field.
npm WARN ang No README data
npm WARN ang No license field.
npm ERR! file C:\Windows\system32\cmd.exe;
npm ERR! path C:\Windows\system32\cmd.exe;
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn C:\Windows\system32\cmd.exe;
npm ERR! #angular/cli#8.2.2 postinstall: `node ./bin/postinstall/script.js`
npm ERR! spawn C:\Windows\system32\cmd.exe; ENOENT
npm ERR!
npm ERR! Failed at the #angular/cli#8.2.2 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\tblaw\AppData\Roaming\npm-cache\_logs\2019-08-16T01_04_13_709Z-debug.log
Do you have the latest node installed? I though I did, but I had separate versions installed via homebrew (which had the latest 12.10), and globally only had 6.5.
Test with node -v and force latest version with nvm install 12.0.0

Installing PhantomJS 2 using NPM fails on Windows

I'm trying to install PhantomJS 2 for a project that requires support for mutation observers. When I use the following command:
npm install phantomjs2 --save-dev
I get the following error:
Unexpected platform or architecture: win32 x64
npm ERR! phantomjs2#2.0.0 install: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the phantomjs2#2.0.0 install script.
npm ERR! This is most likely a problem with the phantomjs2 package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node install.js
npm ERR! You can get their info via:
npm ERR! npm owner ls phantomjs2
npm ERR! There is likely additional logging output above.
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "c:\\Program Files\\nodejs\\node.exe" "c:\\Program Files\\nodej
s\\node_modules\\npm\\bin\\npm-cli.js" "install" "phantomjs2" "--save-dev"
npm ERR! cwd g:\Web\GitHub\pet
npm ERR! node -v v0.10.26
npm ERR! npm -v 1.4.3
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! g:\Web\GitHub\pet\npm-debug.log
npm ERR! not ok code 0
I am using 64 bit Windows 7. Is PhantomJS 2 just not supported on my platform?
Yes, that package currently doesn't support installing PhantomJS 2 on Windows. Just download it from the official page and put the exe in a directory that is in the PATH.

Resources