We've recently upgraded our project Meteor version to v1.8.2, however when running the following command: meteor update --all-packages, were encountering some strange errors. Here's an example of one the errors:
=> Errors while initializing project:
While loading package angular-compilers#0.3.4:
error: Command failed: C:\Windows\system32\cmd.exe /c
E:\Applications\Meteor\.meteor\packages\meteor-tool\1.10.2\mt-os.windows.x86_64\dev_bundle\bin\npm.cmd rebuild --update-binary
Cannot download "https://github.com/sass/node-sass/releases/download/v4.7.2/win32-x64-72_binding.node":
HTTP error 404 Not Found
Hint: If github.com is not accessible in your location
try setting a proxy via HTTP_PROXY, e.g.
export HTTP_PROXY=http://example.com:1234
or configure npm proxy via
Some additional information:
After checking the logs, it seems the meteor tool were using is 1.10.2. Does using the latest meteor tool for a v1.8.2 project cause issues?
1 verbose cli 'E:\\Applications\\Meteor\\.meteor\\packages\\meteor-tool\\1.10.2\\mt-os.windows.x86_64\\dev_bundle\\bin\\node.exe',
Any ideas what's wrong?
Thanks!
Can you post the full logs from meteor update?
Are you using fourseven:scss? Because it installs it’s own version of node-sass which is likely the problem.
Have a look at the version compatibility table here: https://github.com/Meteor-Community-Packages/meteor-scss
And check that the version of fourseven:scss matches a compatible meteor version.
The alternative is to remove it, update and install the atmosphere package again, that way it won’t get in the way of the updater’s dependency resolver
Note that if you are using fourseven:scss, there’s no need to have node-sass in package.json.
Related
We have updated Node to version 10.16.3 and NPM to version 6.11.3 (all the latest at this time) on our Windows based self hosted agent.
However, in a job run logs, we see that the agent reports version 6.9.0 for NPM, which is the default version for Node 10.16.3 installation.
Inside the VM where the hosted agent is, if I run 'npm' in the CMD, I get the latest version for NPM. Also, if I run the same command that the agent is running to get the version, I still get the correct version for NPM:
What could be wrong here?
The reason we want the latest version of NPM is because our builds run faster with it.
Thank you!
We have had a very amateur approach to this problem. When we are logging in through RDP, we are using the user 'agent' and all installations are scoped to that user. However, the agent is using the NetworkService user, which has its own scope for NPM and Node.
The fix was basically to add step in our build pipeline to check for latest version of NPM and install it in case it is not installed.
Yeah, I got caught out by this too. Because it runs under the NetworkService account, it can't read the global folder, so has it's own little copy/cache at
C:\Windows\ServiceProfiles\NetworkService\AppData\Roaming\npm
My easiest way to get back up and running, was to just manually upgrade the npm at that location using the following command:
npm install --prefix C:\Windows\ServiceProfiles\NetworkService\AppData\Roaming\npm npm
after this command:
npm install node-sass
it throws this error:
Cannot download
"https://github.com/sass/node-sass/releases/download/v3.13.1/win32-x64-57_binding.node":
I'm using the Node.js command prompt, I did npm update 5 times, it still tries to download from a 404 repo... i found the working repo requested node but I can't find how to download it manually and start the installation from there, thanks for Your help, I'm using Windows x64.
As their documentation says:
If you see a 404 when trying to install node-sass, this indicates that your trying to install a version of node-sass that doesn't support your version of NodeJS, or uses an alternate V8 environment (Meteor, Electron, etc...) that isn't supported by node-sass.
If you encounter this, please check what version of NodeJs you're running (node -v) and check for a supported version of node-sass for your NodeJs by checking our release page.
A project I am on has a Jenkins server to which I don't have remote access.
The server admin has installed npm 5.8 using npm install -g npm.
Executing npm -v reports a version of 5.8.
However, during the Jenkins build process, npm -v reports a version of 5.6 which is the version that shipped with the installed version of NodeJS.
Can someone assist me in what I should be asking the admin to change?
The admin should be able to install the Jenkins NodeJS Plugin which allows you to handle several different installations (in different versions) of NodeJS. This way you can address the version of NodeJS & npm you want to use from the Job configuration, as the correct folder is temporarily added to the PATH variable.
There is a walkthrough guide on the wiki page of the plugin.
Following steps will help you:
If it is windows machine, you better to restart the node after you install anything. Then only Jenkins can get the updated environment variables.
Verify the Environment variable pointed to correct version folder.
If you know the updated installed path then you can create local environment variable at job level using following command.
env.NODE_HOME =
"C:\Windows\system32\config\systemprofile\AppData\Roaming\npm"
Hey guys for some reason I keep getting this error when building with sass-loader
Module build failed: Error: Missing binding C:\TFS_Local\DPOnGit\node_modules\node-sass\vendor\win32-ia32-11\binding.node
Node Sass could not find a binding for your current environment: Windows 32-bit with Node 0.10.x
Found bindings for the following environments:
- Windows 64-bit with Node.js 5.x
This usually happens because your environment has changed since running npm install.
Run npm rebuild node-sass to build the binding for your current environment.
Very frustrating as this config has worked on the same machine before without issues.
I had the same problem, rebuilding as suggested by the error message didn't work for me, but running
npm install --save sass-loader
did.
I am trying to install socket.io on windows with npm for use on a nodeJS server.
First, when I typed "npm install socket.IO" i had an error in the log saying something about python and node-gyp. I installed python 2.7.3 and set the environment variables.
Now I got a new error, which has something to do with visual studio (what the hell does VS have to do with npm ? Is it about the compiler? ).
The error is the same as here npm install for some packages (sqlite3, socket.io) fail with error MSB8020 on Windows 7
But when I use the option in the answer instead of the error it tells me something about a possible data loss (c4267) but doesn't log any error.
Then when I start my app, it tells me cannot find module socket.io still
What could this come from ?
Oh and also when i do npm config get root it tells me "undefined" could it have anything to do with it ?
Should I install the modules globally or locally ?
At least one of the packages in Socket.IO's dependency tree is a C/C++ addons which needs to be compiled on your system as it's installed. And, since it's a dependency, if it doesn't succeed in installing, neither will Socket.IO.
To enable cross-system compilation, Node.js uses node-gyp as its build system. You'll need to have it installed as a global package:
npm install -g node-gyp
As well as have its dependencies installed. Abridged version:
Python 2
C/C++ Compiler / Build Tools
For Windows, Microsoft Visual Studio 2013 (C++ or Windows Desktop) (Express edition)
For 64-bit, may need Windows 7 64-bit SDK
Then, you should be able to install Socket.IO as a local package so you can require it:
npm install socket.io
I had a similar problem on Mac.
What resolved my problem is installing a slightly older version of Socket.io.
I did:
npm install socket.io#"~0.8.1"
which would install the latest version between 0.8.0 to 0.8.9, but not 0.9.0 or above.
Socket.io then installed perfectly.
Make sure you have all the required software to run node-gyp:
https://github.com/TooTallNate/node-gyp
You can configure version of Visual Studio used by gyp via an environment variable so you can avoid having to set the --msvs_version=2012 property.
Examples:
set GYP_MSVS_VERSION=2012 for Visual Studio 2012
set GYP_MSVS_VERSION=2013e (the 'e' stands for 'express edition')
For the full list see
- https://github.com/joyent/node/blob/v0.10.29/tools/gyp/pylib/gyp/MSVSVersion.py#L209-294
This is still painful for Windows users of NodeJS as it assumes you have a copy of Visual Studio installed and many end users will never have this. So I'm lobbying Joyent to the encourage them to include web sockets as part of CORE node and also to possible ship a GNU gcc compiler as part of NodeJS install so we can permanently fix this problem.
Feel free to add your vote at:
https://github.com/joyent/node/issues/8005#issuecomment-50545326
The problem causing the compile failure is that the ws module installed by the engine.io module required by socket.io pulls in a backlevel version of nan. See https://github.com/BrowserSync/grunt-browser-sync/issues/95 for details. To work around the problem after the build failure:
cd to node_modules/socket.io/node_modules/engine.io/node_modules/ws
edit package.json to change the release of nan from 1.4.x to 1.6.0
issue command node-gyp rebuild
You should now be able to use socket.io
Another approach is to use Docker for Windows and spin up a NodeJS environment. While developing you can mount your Node code as a Docker volume and so continue to update your code from Windows but execute it and install it's dependencies inside a Linux VM. When you deploy you might prefer to use a Dockerfile that COPY's your Node code into your Docker image and so bakes it into the release image you deploy.
This approach might be required if you don't want to risk changing the socket.io version of your code or its dependencies.
It also may be a valuable solution if you planned to deploy to a corporate Intranet or public/private Cloud.
Docker can also be very handy for testing deployment under different versions of Node without disturbing the development environment of your Windows computer (e.g. for testing a NodeJS lib).
Official NodeJS Docker images
An explanation of how to use these images
this problem makes me very troubled..
I tried many solutions.
I installed .NET Framework 2.0 SDK.
I installed Python 2.7.x
I installed VS 2012 Express
I set some paths
I executed npm install xxx with the argument --msvs_version=2010(or 2012/2013..)...
But all failed.
finally, I uninstalled Python & .NET Framework 2.0 SDK & VS 2012, clear those paths,enable Windows Update, install all essential updates, restart my computer
then execute commands below:
npm install node-gyp -g
npm install socket.io -g
npm install browser-sync -g
there is no errors in installation logs.
Note : this solution may not work for you, but for me