When I try to execute 'npx create-next-app', the installation never ends - node.js

I'm trying to create a new NextJS app, but the command npx create-next-app <name> never ends. It installs a few files along the way (including node_modules/), then after a while, among all the great lines that a CMD shows, it displays an installation line that never ends. When I try to cancel the installation, I must restart my PC completely.
Note: the last line is always beginning with "reify:something: timing ... Completed in Xms"
My problem
I've tried to reinstall NodeJS, It did not change a single thing.
I've tried to delete the cache, nothing changed.
I have used npm in the past and it always worked fine, I have absolutely no idea why it doesn't work now.
Please help me, I don't know what to do, except to throw my PC out the window.
I'm on Windows 10, using npm 7.24.1 with node v14.17.6

Finally, I fixed my problem thanks to Marcel Herd: I installed WSL 2 and from now on I'll use Ubuntu on Windows to execute npm commands.
However, I have still no idea why I had to do such a thing...
Thank you
If you are interested, here are links that helped me:
https://learn.microsoft.com/en-us/windows/wsl/install
https://learn.microsoft.com/en-us/windows/wsl/setup/environment
https://learn.microsoft.com/fr-fr/windows/dev-environment/javascript/nodejs-on-wsl

Related

Yeoman generator works except on Windows 10 with Node 10

I have a generator that works on Ubuntu, Mac, and Windows 10 with Node 8.
It also (reportedly) runs on Win10 with Node 10 when run on either mintty.exe or Git bash from the git package (https://git-scm.com/download/win).
However it hangs when run on Win10 with Node 10 on either PowerShell or command.exe.
The "prompting" method runs fine and the "this.prompt" promise resolves OK. The problem is the "writing" method" is never run.
You can see the problem by going to an empty folder and running
npm i -g #feathers-plus/cli
set DEBUG=gen*
feathers-plus generate app
and pressing Enter on all the prompts.
You can see https://github.com/feathers-plus/generator-feathers-plus/blob/master/generators/app/index.js#L173 is run, but not https://github.com/feathers-plus/generator-feathers-plus/blob/master/generators/app/index.js#L178 .
Before I start digging into the Yeoman source, has anyone run into something similar, does anyone have any thoughts on what the issue may be, any thoughts on how to proceed? Thanks in advance.

Node isn't recognized

Referring to the above picture, can someone please tell my why my NPM script would continually fail saying that node is not recognized.
nodejs is clearly in my $PATH and it correctly identifies where it is on my computer outside of an npm script.
I am using Git Bash inside ConEMU on Windows Version 10.0.17134 Build 17134.
I wouldn't be surprised if the issue is with Windows, as the problem seems to have popped up since the latest OS update, installed just over a week ago (I've been having this issue for around that same amount of time)
I have finally got it working! It is, unsurprisingly, a Windows issue.. Because I had a few entries in my $PATH, and the nodejs one was at the end, Windows would silently fail when reading the entire path, and not get as far as the nodejs entry. The fix was to move the nodejs in the Environment Variables control panel to the very top

NPM commands 'Aborted' if I don't run as root.

I've run into what I think is a fairly new problem - I'm running npm on my production machine and it only runs when I'm logged in as root. Otherwise, it just exits saying "Aborted". The only command I can give is npm -v which prints out 4.2.0
It seems like a permissions issue (one answer for which was to delete and re-install everything with NVM) but I hadn't seen anyone else reporting this issue of the command just exiting with "Aborted", so I wanted to see if there was something else going on before doing anything drastic.
Let me know if I can provide any additional context! Thanks, all!

Getting Node to work on windows 7 enterprise

For the better part of a day now I've been trying to get node.js to work on my computer.
Even though I get no errors during installation, whenever i try to run node or npm from the command line I only get the error "Evented I/O for V8 JavaScript has stopped working" and then nothing happens.
I really have no clue why it isn't working and what I have to do to get it to work! Has anyone else ever had the same problem and were you able to fix it somehow?
It seems the problem was with ansicon which I installed together with cucumber.
I was able to fix the problem by running "ansicon -u" in my x64 folder

Rollback on node.js install on Windows 7 x64 PC

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...

Resources