Rollback on node.js install on Windows 7 x64 PC - node.js

I've been trying to get node.js installed on my home PC for a while now with no luck. I've tried different versions for the past couple months and no matter what I try it starts rolling back the install at "Creating shortcuts" and it fails to install. I created an install log for anyone who wants to look at it and take a stab at helping me solve the problem. Thanks!
https://dl.dropbox.com/u/177486/MSIf99e3.LOG

I have faced the same problem, I have resolved my issue. I just mark performance counter to Install when required during installation of node.js

Windows Installer is reporting that it's installed even though it's been rolled back.
Run msiexec /x {29552F29-7FE9-441F-BC56-E6B591587A59}
Where the above guid is the ProductCode value from your log.
If that doesn't work and you have access to Orca.exe from the Windows SDK, you may be able to modify WixSchedInternetShortcuts to a false condition and install successfully. To do that, install Orca, then right click on the node.js msi file and choose 'Edit with Orca' then:
Highlight InstallExecuteSequence under "Tables" on the left.
Find WixSchedInternetShortcuts in the right
Double-click the Condition cell and change VersionNT > 400 to 0
Go to File -> Save
Run the installer again
After installing this version, you should be able to cleanly remove it via Add/remove programs and install another version without modifying the msi file.

I had the same problem with v0.10.35. (23 Jan 2015)
All I had to do was disable the shortcuts in the custom install pane and it worked fine:

My solution
You must install each item separately.
Npm package manager
Add to path
Online documentation ...
Nodejs runtime / Performans counter
(İmportant) nodejs runtime / Event tracing(etw) (select"feature will be installed be required"
restart computer
Last install view

All above methods do not work.
-running msiexec as admin
-msiexec /x ...
-modifying WixSchedInternetShortcuts
-dropping the row WixSchedInternetShortcuts
-even this: removing the option of creating shortcut to online documentation during the installation
Might manually fix it, you can read this help to install product and then add C:\Program Files\nodejs Path to Windows Environment variables.

Open the command promt and paste the below comman
reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Perflib_V2Providers{793c9b44-3d6b-4f57-b5d7-4ff80adcf9a2}" /s
reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Perflib_V2Providers{1e2e15d7-3760-470e-8699-b9db5248edd5}" /s
If you get a result for the command , go to the registry key and delete that key. Now try to install it again. You should be able to install it now.

msiexec /i node.msi /qn+ ADDLOCAL=ALL REMOVE=NodePerfCtrSupport,NodeEtwSupport
This might help

Had the same problem. Solution 1 provided by Jim Schubert did not fix it. I then used Orca to edit the installation file. Changing the VersionNT condition also did not fix it for me. I then just dropped the rows from WixSchedInternetShortcuts and it installed successfully. I guess it had some problem with writing the shortcuts. I had also previously tried running msiexec as admin ("/a" option), but this didn't fix it...

One point to be aware of (I learn it the hard way): even after having edited the installer with Orca, don't try to uncheck the checkboxes for shortcuts creation in the installer, leave them checked or it will fail with the same error message.

It happened to me as well, I removed almost everything from the installation and completed the installation. After that I ran the installation again and added one by one until I installed all.

You can always use chocolately install:
https://chocolatey.org/packages/nodejs.install/8.11.1
choco install nodejs.install --version 8.11.1

Check if Avast Antivirus is installed in your machine.
If it is turn off the shields and try installing nodejs
Now it works completely fine...

Related

command prompt when i try install any dependence

when I try to install any dependence in command prompt get this error message and tried to google but nothing any one to help me please
please I need help someone to help me
try installing locally. and add this path to your system variable: C:\Program Files\nodejs
Reinstall the node.
You have two ways to install Node.js on your computer.
Option 1 – Setup by running the .msi installation file
Its a typical Windows installation and automated. No need to add
entries in environment varaiable
Option 2 – Setup by extracting .zip file
This method does not require admin access and can be used to install
on nodejs on a system on which you dont have admin access such as you
official laptop or desktop.
Removing nodejs is as simple as deleting the folder. You will have
to add entries in environment variable if you want to execute node
command from any location in windows command prompt. https://nodejs.org/en/download/
Based on the screenshot.your access is denied.Would suggest starting the terminal as an administrator before running the command.

npm run build on windows 10 gives This app can't run on your PC

Trying to run the command npm run build on my system but keep getting this
error. Tried uninstalling node but no luck. Any pointers would be helpful
The issue for me was that I am using nvm, and for reasons I don't yet know, when I try to set my node version to 12.14.0, and then run nvm list, no versions are selected. I went back to 13.8.0 and nvm list showed that 13.8.0 was selected.
Long story short, make sure you have a selected node version.
you should follow one of two option:
Option 1 – Setup by running the .msi installation file
Its a typical Windows installation and automated.
No need to add entries in environment varaiable
Option 2 – Setup by extracting .zip file
This method does not require admin access and can be used to install on nodejs on a system on which you dont have admin access such as you official laptop or desktop.
Removing nodejs is as simple as deleting the folder.
You will have to add entries in environment variable if you want to execute node command from any location in windows command prompt.
See the link below for more details : install Node.js and NPM on Windows 10

Getting the targetdir variable must be provided when invoking this installer while installing python 3.5

I have Python 2.7 on my Window 7. Problem is with python 3.5 and 3.6 version only.
Hey just right click on exe file and run as a administrator.It worked for me :)
There are 2-3 ways to solve the issue:
As suggested above, Right-click on exe file and run as administrator.
Open command prompt in administrator mode.
Just take a note of where your setup file location is present.
Use cd C:\Users\ABC\Downloads
Type C:\>python-3.7.0.exe TargetDir=C:\Python37
Note: my setup file was python-3.7.0.exe
Follow the steps
3.Please try to do the custom installation and choose a clean folder location. In custom installation, we can tick or un-tick some option. Choose only 1/2 option which are required. Leave rest. Sometimes this troubleshoot step also help to install.
4.Go to properties of python Setup file. Go to advance setting and change the owner to administrator. Also go to compatibility and tick on "Run as administrator"
This worked for me.
Right Click on the setup file and Run as administrator

Fixing npm path in Windows 8 and 10

Have done a lot of googling, tried reinstalling node.js using the official installer, but my npm pathing still doesn't work.
This doesn't work
npm install foo
I get an error message saying missing module npm-cli.js
2 hours of googling later I discovered a workaround
Instead of simply 'npm' I type
node C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js
But how can I correct my nodejs install so I can simply type 'npm' ?
You need to Add C:\Program Files\nodejs to your PATH environment variable. To do this follow these steps:
Use the global Search Charm to search "Environment Variables"
Click "Edit system environment variables"
Click "Environment Variables" in the dialog.
In the "System Variables" box, search for Path and edit it to include C:\Program Files\nodejs. Make sure it is separated from any other paths by a ;.
You will have to restart any currently-opened command prompts before it will take effect.
get the path from npm:
npm config get prefix
and just as a future reference, this is the path I added in Windows 10:
C:\Users\{yourName}\AppData\Roaming\npm
Update:
If you want to add it for all users just add the following path [by #glenn-lawrence from the comments]:
%AppData%\npm
I have used the cmdlet and navigate to the path you want to switch your npm files to. Type in npm root -g to see what the current path your npm is installed to. Next use npm config set prefix and your npm path will be changed to whatever directory you are currently on.
Try this one dude if you're using windows:
1.) Search environment variables at your start menu's search box.
2.) Click it then go to Environment Variables...
3.) Click PATH, click Edit
4.) Click New and try to copy and paste this: C:\Program Files\nodejs\node_modules\npm\bin
If you got an error. Do the number 4.) Click New, then browse the bin folder
You may also Visit this link for more info.
Go to control panel -> System -> Advanced System Settings then environment variables.
From here find the path variable, Go to the end of the line and paste "C:\Program Files\nodejs\node_modules\npm\bin" (change the path to the directory to where ever you installed it e.g. if you specifically installed it anywhere change it)
Edit the System environment variables, and enter following path:
C:\Program Files\nodejs\node.exe;
C:\Users\{yourName}\AppData\Roaming\npm
Installed Node Version Manager (NVM) for Windows: https://github.com/coreybutler/nvm-windows
I'm using Windows 10 - 64 bit so I run...
Commands:
nvm arch 64 (to make default the 64 bit executable)
nvm list (to list all available node versions)
nvm install 8.0.0 (to download node version 8.0.0 - you can pick any)
nvm use 8.0.0 (to use that specific version)
In my case I had to just switch to version 8.5.0 and then switch back again to 8.0.0 and it was fixed.
Apparently NVM sets the PATH variables whenever you do that switch.
You can follow the following steps:
Search environment variables from start menu's search box.
Click it then go to Environment Variables
Click PATH
click Edit
Click New and try to copy and paste your path for 'bin' folder [find where you installed the node] for example according to my machine 'C:\Program Files\nodejs\node_modules\npm\bin'
If you got any error. try the another step:
Click New, then browse for the 'bin' folder
If after installing your npm successfully, and you want to install VueJS then this is what you should do
after running the following command (as Admin)
npm install --global vue-cli
It will place the vue.cmd in the following directory
C:\Users\YourUserName\AppData\Roaming\npm
you will see this in your directory.
Now to use vue as a command in cmd. Open the cmd as admin and run the following command.
setx /M path "%path%;%appdata%\npm"
Now restart the cmd and run the vue again. It should work just fine, and then you can begin to develop with VueJS.
I hope this helps.
This worked for me:
1. npm root -g (to see the current npm is installed)
2. npm config set prefix (to change the path)
I did this in Windows 10,
Search for Environment Variables in the Windows search
"Edit the System environment variables" option will be popped in the result
Open that, select the "Path" and click on edit, then click "New" add your nodeJS Bin path i.e in my machine its installed in c:\programfiles\nodejs\node_modules\npm\bin
Once you added click "Ok" then close
Now you can write your command in prompt or powershell.
If you using WIndows 10, go for powershell its a rich UI
change the path for nodejs in environment varibale.
add Environment Path to
C:\Program Files\nodejs\node.exe;C:\Users[your username]\AppData\Roaming\npm
steps 1
in the user variable and system variable
C:\Program Files\nodejs
then check both node -v
and the npm -v
then try to update the the npm i -g npm
I've had this issue in 2 computers in my house using Windows 10 each.
The problem began when i had to change few Environmental variables for projects that I've been working on Visual studio 2017 etc.
After few months coming back to using node js and npm I had this issue again and non of the solutions above helped.
I saw Sean's comment on Yar's solution and i mixed both solutions:
1) at the environmental variables window i had one extra variable that held this value: %APPDATA%\npm. I deleted it and the problem dissapeared!
If you can't work with npm packages, you propably has bad config with npm install packages, you try this:
Run the following command in your terminal to revert back to the default registry
npm config set registry https://registry.npmjs.org/
https://docs.npmjs.com/misc/config#registry
When you're on Windows but running VS Code in Windows Subsystem for Linux like this
linux#user: /home$ code .
you actually want to install NodeJs on Linux with
linux#user: /home$ sudo apt install nodejs
Installing NodeJs on Windows, modifying PATH and restarting will get you no results.
If, like me, you have MSYS_NO_PATHCONV = 1 configured as a user variable for Git Bash, this issue will be triggered. To workaround, you can either remove this variable or use a different shell (PowerShell) for npm.
I did Node repair with the .msi file and everything worked well.
I may be a total noob but I had no clue I had to install npm-cli first. I had just assumed I already had it.
npm install --global vue-cli

Installing Node.js (and npm) on Windows 10

I had some issues trying to install Node on Windows 10 and found the solution.
The error was as follows:
C:\Users\Stephan>npm
Error: ENOENT, stat 'C:\Users\Stephan\AppData\Roaming\npm'
The solution is below.
Edit:
It seems like new installers do not have this problem anymore, see this answer by Parag Meshram as my answer is likely obsolete now.
Original answer:
Follow these steps, closely:
http://nodejs.org/download/ download the 64 bits version, 32 is for hipsters
Install it anywhere you want, by default: C:\Program Files\nodejs
Control Panel -> System -> Advanced system settings -> Environment Variables
Select PATH and choose to edit it.
If the PATH variable is empty, change it to this: C:\Users\{YOUR USERNAME HERE}\AppData\Roaming\npm;C:\Program Files\nodejs
If the PATH variable already contains C:\Users\{YOUR USERNAME HERE}\AppData\Roaming\npm, append the following right after: ;C:\Program Files\nodejs
If the PATH variable contains information, but nothing regarding npm, append this to the end of the PATH: ;C:\Users\{YOUR USERNAME HERE}\AppData\Roaming\npm;C:\Program Files\nodejs
Now that the PATH variable is set correctly, you will still encounter errors. Manually go into the AppData directory and you will find that there is no npm directory inside Roaming. Manually create this directory.
Re-start the command prompt and npm will now work.
go to http://nodejs.org/
and hit the button that says "Download For ..."
This'll download the .msi (or .pkg for mac) which will do all the installation and paths for you, unlike the selected answer.
In addition to the answer from #StephanBijzitter I would use the following PATH variables instead:
%appdata%\npm
%ProgramFiles%\nodejs
So your new PATH would look like:
[existing stuff];%appdata%\npm;%ProgramFiles%\nodejs
This has the advantage of neiter being user dependent nor 32/64bit dependent.
New installers (.msi downloaded from https://nodejs.org) have "Add to PATH" option. By default it is selected. Make sure that you leave it checked.
Everything should be installed in %appdata% (C:\Users\\AppData\Roaming), not 'program files'.
Here's why...
The default MSI installer puts Node and the NPM that comes with it in 'program files' and adds this to the system path, but it sets the user path for NPM to %appdata% (c:\users[username]\appdata\roaming) since the user doesn't have sufficient priveleges to write to 'program files'.
This creates a mess as all modules go into %appdata%, and when you upgrade NPM itself - which NPM themselves recommend you do right away - you end up with two copies: the original still in 'program files' since NPM can't erase that, and the new one inn %appdata%.
Even worse, if you mistakenly perform NPM operations as admin (much easier on Windows then on *nix) then it will operate on the 'program files' copy of NPM node_modules. Potentially a real mess.
So, when you run the installer simply point it to %appdata% and avoid all this.
And note that this isn't anything wierd - it’s what would happen if you ran the installer with just user priveleges.
You should run the installer as administrator.
Run the command prompt as administrator
cd directory where msi file is present
launch msi file by typing the name in the command prompt
You should be happy to see all node commands work from new command prompt shell
I had the same problem, what helped we was turning of my anti virus protection for like 10 minutes while node installed and it worked like a charm.
The reason why you have to modify the AppData could be:
Node.js couldn't handle path longer then 256 characters, windows tend to have very long PATH.
If you are login from a corporate environment, your AppData might be on the server - that won't work. The npm directory must be in your local drive.
Even after doing that, the latest LTE (4.4.4) still have problem with Windows 10, it worked for a little while then whenever I try to:
$ npm install _some_package_ --global
Node throw the "FATAL ERROR CALL_AND_RETRY_LAST Allocation failed - process out of memory" error. Still try to find a solution to that problem.
The only thing I find works is to run Vagrant or Virtual box, then run the Linux command line (must matching the path) which is quite a messy solution.
For me I had to delete the nodejs folder in \program files and then when I went to install through the msi it worked. Seemed like when I uninstalled Node it didnt actually delete this file
I had the same problem, but after trying everything on this post unsuccessfully, I just had to restart.
So if you haven't tried restarting the computer after the installation, try it.
Restart your computer after installation

Resources