I tried to install saltcorn using this wiki page. https://wiki.saltcorn.com/view/ShowPage/install-on-windows-10
It is failing due to vips error
npm 8.1.0
node 16.13.0
C:\Users\varsha\AppData\Roaming\npm\node_modules\#saltcorn\cli\node_modules\sharp
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node-gyp rebuild
npm ERR! Building the projects in this solution one at a time. To enable parallel build, please add the "-m" switch.
npm ERR! nothing.c
npm ERR! win_delay_load_hook.cc
npm ERR! nothing.vcxproj -> C:\Users\varsha\AppData\Roaming\npm\node_modules\#saltcorn\cli\node_modules\sharp\build\Release\\nothing.lib
npm ERR! VError.cpp
npm ERR! C:\Users\varsha\AppData\Roaming\npm\node_modules\#saltcorn\cli\node_modules\sharp\src\libvips\cplusplus\VError.cpp(33,10): fatal error C1083: Cannot open include file: 'vips/intl.h': No such file or directory [C:\Users\varsha\AppData\Roaming\npm\node_modules\#saltcorn\cli\node_modules\sharp\build\libvips-cpp.vcxproj]
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp#8.2.0
npm ERR! gyp info using node#16.13.0 | win32 | x64
npm ERR! gyp info find Python using Python version 3.10.0 found at "C:\Python310\python.exe"
npm ERR! gyp info find VS using VS2019 (16.11.32002.261) found at:
npm ERR! gyp info find VS "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community"
npm ERR! gyp info find VS run with --verbose for detailed information
Your node is too recent, try downgrading to node 15. See:
https://sharp.pixelplumbing.com/install
Background: sharp ships binaries for most platforms, but not yet node16 (as of the time of writing). If it does not have precompiled binaries available, sharp will try to build them for you on your machine using node-gyp. Sadly, especially on windows, this is extremely fragile and can break in 1000s of bizarre ways.
You can spend many hours trying to fix it, or (much more sensibly) you can switch to a supported version of node.
Related
while trying to install parcel through npm in VScode, getting the below error.
npm ERR! code 1
npm ERR! path C:\Users\user-id\ws-js-001\node_modules\#parcel\watcher
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node-gyp-build
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp#7.1.2
npm ERR! gyp info using node#16.2.0 | win32 | x64
npm ERR! gyp ERR! find Python
npm ERR! gyp ERR! find Python checking Python explicitly set from command line or npm configuration
npm ERR! gyp ERR! find Python - "--python=" or "npm config get python" is "python3.10"
npm ERR! gyp ERR! find Python - "python3.10" is not in PATH or produced an error
npm ERR! gyp ERR! find Python checking Python explicitly set from environment variable PYTHON
npm ERR! gyp ERR! find Python - process.env.PYTHON is "C:\Users\user-id\AppData\Local\Programs\Python\Python310\python.exe"
npm ERR! gyp ERR! find Python - "C:\Users\user-id\AppData\Local\Programs\Python\Python310\python.exe" is not in PATH
or produced an error
The config value in config file is
C:\Users\user-id\ws-js-001> npm config get python
python3.10
Also the environment variable python is set to
C:\Windows\system32>set PYTHON
PYTHON=C:\Users\user-id\AppData\Local\Programs\Python\Python310\python.exe
Could you please help me with the changes that are required to fix this issue.
#parcel/watcher is a native C++ package that parcel uses to monitor your project for changes and re-build when it sees them. To create the bindings between native C++ and node under the hood, it uses node-gyp-build. According to node-gyp documentation:
node-gyp requires that you have installed a compatible version of Python, one of: v3.6, v3.7, v3.8, or v3.9.
So I'd recommend upgrading your version of python to one of the supported versions.
(Side note - it looks like #parcel/watcher includes a pre-built binaries for a number of platforms, including windows-x64, so that you don't need to build anything with node-gyp if you are consuming the package on those systems. My guess is that you're using 32-bit windows, because that doesn't seem to be included - is that right?)
how to fix an error of creating Vue 3 project + Jest?
I used npm i -g #vue/cli
and
vue create .
Logs:
/*
Microsoft Windows [Version 10.0.17763.1217]
(c) 2018 Microsoft Corporation. All rights reserved.
D:\Projects\FrontEnd\fcrp>vue create .
Vue CLI v4.5.13
? Generate project in current directory? Yes
Vue CLI v4.5.13
? Please pick a preset: Manually select features
? Check the features needed for your project: Choose Vue version, Babel, Router, Vuex, CSS Pre-processors, Linter, Unit, E2E
? Choose a version of Vue.js that you want to start the project with 3.x
? Use history mode for router? (Requires proper server setup for index fallback in production) No
? Pick a CSS pre-processor (PostCSS, Autoprefixer and CSS Modules are supported by default): Sass/SCSS (with dart-sass)
? Pick a linter / formatter config: Prettier
? Pick additional lint features: Lint on save
? Pick a unit testing solution: Jest
? Pick an E2E testing solution: WebdriverIO
? Pick browsers to run end-to-end test on Chrome, Firefox
? Where do you prefer placing config for Babel, ESLint, etc.? In dedicated config files
? Save this as a preset for future projects? No
Vue CLI v4.5.13
✨ Creating project in D:\Projects\FrontEnd\fcrp.
⚙️ Installing CLI plugins. This might take a while...
npm ERR! code 1
npm ERR! path D:\Projects\FrontEnd\fcrp\node_modules\fibers
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node-gyp rebuild
npm ERR! Building the projects in this solution one at a time. To enable parallel build, please add the "-m" switch.
npm ERR! fibers.cc
npm ERR! C:\Users\Vector\AppData\Local\node-gyp\Cache\16.2.0\include\node\node.h(63,10): fatal error C1083: Cannot open include file: 'v8.h': No such file or directory [D:\Projects\FrontEnd\fcrp\node_modules\fibers\build\fibers.vcxproj]
npm ERR! (node:1448) [DEP0150] DeprecationWarning: Setting process.config is deprecated. In the future the property will be read-only.
npm ERR! (Use `node --trace-deprecation ...` to show where the warning was created)
npm ERR! gyp ERR! build error
npm ERR! gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\MSBuild.exe` failed with exit code: 1
npm ERR! gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:194:23)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:365:28)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
npm ERR! gyp ERR! System Windows_NT 10.0.17763
npm ERR! 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"
npm ERR! gyp ERR! cwd D:\Projects\FrontEnd\fcrp\node_modules\fibers
npm ERR! gyp ERR! node -v v16.2.0
npm ERR! gyp ERR! node-gyp -v v7.1.2
npm ERR! gyp ERR! not ok
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Vector\AppData\Local\npm-cache\_logs\2021-06-01T00_11_29_219Z-debug.log
ERROR command failed: npm install --loglevel error --legacy-peer-deps
D:\Projects\FrontEnd\fcrp>
*/
Node is installed and additional files are installed, but the problem is not solved, What is going wrong
npm install --global --production windows-build-tools
npm install --global node-gyp
Didn't help to solve the problem
Mocha + Chai works fine without an errors but Jest get errors
WebdriverIO (WebDriver/DevTools based) also raises an error but Cypress (Chrome only) works fine
I'm trying to install ZeroMQ into an electron application but I'm unable to rebuild the package for electron.
I'm trying to install ZeroMQ for electron 5.1.0 on my Windows 10 machine. Details:
OS: Windows 10
Electron: 5.0.8
node: 12.0.0
As per the instructions in the README.md https://github.com/zeromq/zeromq.js/, I have followed this procedure:
1) Install zeromq with npm
npm install zeromq
2) Rebuild for electron
npm rebuild zeromq --runtime=electron --target=5.1.0
Notes: The documentation indicates that the target here is supposed to be the Electron version; however, this causes a 404 error as npm tries to go to https://nodejs.org/dist/v5.0.8/node-v5.0.8-headers.tar.gz which doesn't exist. I then thought to try the node version, but that leads to a 401 error. I then tried the zeromq version (5.1.0 as shown in command) which leads to this error:
error MSB4019: The imported project "C:\Microsoft.Cpp.Default.props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
Googling this error brings up a lot of StackOverflow problems where the build tools are required. Looking a little ahead on the README.md led me to thing I could solve this problem using the next command.
3) Install visual studio build tools
npm install --global --production windows-build-tools
This command is completed successfully and installs both the build tools and python2.7
4) Rerunning the rebuild command in step 2 leads to the same error. I tried variations of this command:
npm config set msvs_version 2013
using 2015 and 2017 as well.
2013 and 2015 give this error:
error MSB4019: The imported project "C:\Microsoft.Cpp.Default.props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
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:198:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
gyp ERR! System Windows_NT 10.0.17134
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\<user>\path\to\app\node_modules\zeromq
gyp ERR! node -v v10.16.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! zeromq#5.1.0 install: node scripts/prebuild-install.js || (node scripts/preinstall.js && node-gyp rebuild)
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the zeromq#5.1.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
While 2017 gives this:
error MSB8020: The build tools for v140 (Platform Toolset = 'v140') cannot be found. To build using the v140 bui
ld tools, please install v140 build tools. Alternatively, you may upgrade to the current Visual Studio tools by select
ing the Project menu or right-click the solution, and then selecting "Retarget solution". [C:\Users\<user>\path\to\app\node_modules\zeromq\build\zmq.vcxproj]
with a similar ending section as the other years produced.
In the end this was a visual studio build tools install error. I uninstalled visual studio using the visual studio installer and then reinstalled windows-build-tools.
I created a web app in NodeJS which uses Tensorflow to get a prediction from a model trained in Python. What I'm trying to do is deploy that through IBM Cloud's Cloud Foundry SDK for NodeJS. The problem I'm running into is when I'm trying to push my project to IBM Cloud. From looking at the logs in the console it seems that TensorflowJS Node when it's installing and runs
node-gyp rebuild
it causes some issues. For some reason it runs into an error when that's running which is
/temp/app/node_modules/#tensorflow/tfjs-node/deps/tensorflow/lib/libtensorflow.so: file not recognized: File format not recognized
and from there it causes a long chain of errors. Anyone know how I can fix this?
Here is are the command line logs.
Downloaded build artifacts cache (484.1K)
Staging...
-----> IBM SDK for Node.js Buildpack v3.21-20180628-1258
Based on Cloud Foundry Node.js Buildpack v1.5.24
-----> Creating runtime environment
NPM_CONFIG_LOGLEVEL=error
NPM_CONFIG_PRODUCTION=true
NODE_ENV=production
NODE_MODULES_CACHE=true
-----> Installing binaries
engines.node (package.json): unspecified
engines.npm (package.json): unspecified (use default)
Resolving node version (latest stable) via 'node-version-resolver'
Installing IBM SDK for Node.js (6.14.3) from cache
Using default npm version: 3.10.10
-----> Restoring cache
Loading 2 from cacheDirectories (default):
- node_modules (exists - skipping)
- bower_components (not cached - skipping)
-----> Checking and configuring service extensions before installing
dependencies
-----> Building dependencies
Prebuild detected (node_modules already exists)
Rebuilding any native modules
> protobufjs#6.8.8 postinstall /tmp/app/node_modules/protobufjs
> node scripts/postinstall
> #tensorflow/tfjs-node#0.1.9 install
/tmp/app/node_modules/#tensorflow/tfjs-node
> node-gyp rebuild
make: Entering directory `/tmp/app/node_modules/#tensorflow/tfjs-
node/build'
ACTION binding_gyp_tfjs_binding_target_download_libtensorflow
Release/libtensorflow.so
CXX(target) Release/obj.target/tfjs_binding/binding/tfe_utils.o
CXX(target) Release/obj.target/tfjs_binding/binding/tfjs_backend.o
CXX(target) Release/obj.target/tfjs_binding/binding/tfjs_binding.o
SOLINK_MODULE(target) Release/obj.target/tfjs_binding.node
/tmp/app/node_modules/#tensorflow/tfjs-
node/deps/tensorflow/lib/libtensorflow.so: file not recognized: File
format
not recognized
collect2: error: ld returned 1 exit status
make: *** [Release/obj.target/tfjs_binding.node] Error 1
make: Leaving directory `/tmp/app/node_modules/#tensorflow/tfjs-
node/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit
(/tmp/app/vendor/node/lib/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_process.js:219:12)
gyp ERR! System Linux 4.4.0-109-generic
gyp ERR! command "/tmp/app/vendor/node/bin/node"
"/tmp/app/vendor/node/lib/node_modules/npm/node_modules/node-
gyp/bin/node- gyp.js" "rebuild"
gyp ERR! cwd /tmp/app/node_modules/#tensorflow/tfjs-node
gyp ERR! node -v v6.14.3
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Failed at the #tensorflow/tfjs-node#0.1.9 install script
'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm
installed.
npm ERR! node-gyp rebuild
npm ERR! Linux 4.4.0-109-generic
npm ERR! argv "/tmp/app/vendor/node/bin/node"
"/tmp/app/vendor/node/bin/npm" "rebuild" "--
nodedir=/tmp/app/vendor/node"
npm ERR! node v6.14.3
npm ERR! npm v3.10.10
npm ERR! #tensorflow/tfjs-node#0.1.9 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! If you do, this is most likely a problem with the
#tensorflow/tfjs-node package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! You can get information on how to open an issue for this
project with:
npm ERR! npm bugs #tensorflow/tfjs-node
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls #tensorflow/tfjs-node
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support
request:
npm ERR! /tmp/app/npm-debug.log
-----> Build failed
Some possible problems:
- node_modules checked into source control
http://docs.cloudfoundry.org/buildpacks/node/node-tips.html
- Node version not specified in package.json
http://docs.cloudfoundry.org/buildpacks/node/node-tips.html
Failed to compile droplet: Failed to compile droplet: exit status 1
Exit status 223
Staging failed: STG: Exited with status 223
Stopping instance 4e1dd2ee-71b4-4f84-95e8-c5f6c7bd24e0
Destroying container
Error staging application: App staging failed in the buildpack compile
phase
FAILED
It is a problem related to the version of NodeJs installed on your cloud environment. The errors shows that the version of NodeJs being used is Node.js (6.14.3) whereas tensorflowJs requires Node V8+
For some reason if I remove the node_modules folder from the working directory and then try to push to IBM Cloud it works. My guess is probably because when Tensorflow installs it installs certain files depending on your operating system and in my case
libtensorflow.so
was one of those files.
First time asking a question, sorry if I mess it up.
I am trying to install karma, I would prefer a local install but can't get it to install globally or locally. Strangely enough karma and karma-cli seem to install however they won't run no matter what I try.
C:\Users\rdana\AppData\Roaming\npm\node_modules\karma\node_modules\
socket.io\node_modules\socket.io-client\node_modules\engine.io-
client\node_modules\ws\node_modules\bufferutil>
if not defined npm_config_node_gyp
(node "C:\Program Files\nodejs\node_modules\npm\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.
C:\Users\rdana\AppData\Roaming\npm\node_modules\karma\
node_modules\socket.io\node_modules\socket.io-
client\node_modules\engine.io-
client\node_modules\ws\node_modules\bufferutil\build\bufferutil.vcxproj(20,3):
error MSB4019: The imported project "C:\Microsoft.Cpp.Default.props" was
not found. Confirm that the path in the <Import> declaration is correct,and that the file exists on disk.
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\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:270: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 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 C:\Users\rdana\AppData\Roaming\npm\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\node_modules\ws\node_modules\bufferutil
gyp ERR! node -v v4.2.2
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
npm WARN optional dep failed, continuing utf-8-validate#1.2.1
npm WARN optional dep failed, continuing bufferutil#1.2.1
I have consulted other posts with this error
npm install -g karma error MSB4019: The imported project "C:\Microsoft.Cpp.Default.props" was not found
I have tried "npm install -g karma --msvs_version=2013"
I have Visual Studio 2012 on my machine, I have Python 2.7.3 as well.I have uninstalled and reinstalled node-gyp. I haven't messed with any of the Windows SDK, then VS SP1, then a VC++ compiler stuff yet because this is a work machine and I don't have local admin rights to download software.
At this point I am kind of stuck. Any help would be appreciated.
As mentioned before,I have also installed the CLI tool for karma. I have added npm/node to my path. Maybe the reason karma won't run is some executable issues I saw in some posts floating around but I figured I would post on here because of the install issues first.
Thanks again in advance!