Starting node server gives node fibers error - node.js

I was working on node. Everything was fine. I reinstalled my windows and now when I start node server, it gives me the following error.
I reinstalled fibers as well but still the same issue. Any guesses what I should do?

Thats sounds to me for reinstalling node.js completely, see e.g. this post.
The hard thing is to install the globale modules (those which you have installed with npm -g before you've started the project). From your project make a copy without the node_modules and enter npm install. This worked for me, but I have to deal with the error messages which are missing the global modules.

Related

The react-native init hangs on macOS Catalina, with fetchMetadata: sill resolveWithNewModule react-native#0.64.2 checking installable status

I just wanted to create a react native application using react-native init command. But it hangs with the message:
fetchMetadata: sill resolveWithNewModule react-native#0.64.2 checking
installable status
Sure I am not the first one facing the same issue and I found many answers and tried almost all solutions I found while googling it,
Examples are:
Uninstall and reinstall node
Install yarn
Clear npm cache
Install node using home-brew instead of direct installation
npm i -g react-native; then react-native init
and many other solutions, but it is still stuck.
It is not related to the MacOS version or Network connectivity etc anyway; because It worked on another machine with same OS, and on the same network.
I am sure the react native community is familiar with the question and may somebody will say this is already answered and thus will close it, but it still hangs. I don't know what the issue is.
I am not sure it is related to node or npm or some other. Because I faced the same issue, when I tried create-react-app.
I just wanted to know is there any solution to solve the issue?
and
is there anyway the node, npm or npx or other produce some error when it hangs for any reason, may be while downloading some dependency or while running some commands etc; and show some information regarding what is happened and what is missing.
Assuming this is more related to node, npm or npx; as these are responsible for downloading and running the modules and dependencies or it can be because of error handling in react-native init. Whichever, may be assuming everything fine on the machine, and may not be checking and reporting, if something is missing.
Screenshot: React Js and React-Native hangs
Few days after, surprisingly, it started working. I didn't change anything and I was planned to try a fresh installation of everything from OS installation. But now, I got it working, with no notable reason.

I cannot start my nestjs project after a reboot

I don't know what happened prior to this issue but after each reboot i have to fully remove npm and nodejs, reinstall both npm and nodejs in order to start my nestjs project.
After rebooting running the npm run start command in my nestjs project, npm stops halfway and exits without any error codes (Link below of the terminal output).
https://i.stack.imgur.com/zrbXp.png
What could it be? Is there perhaps some system path that gets wiped on reboot?
Any help or pointers would be greatly appreciated
Turns out both my angular project and my nestjs project required me to run a very specific version of node. anything else resulted in a silently crashing nestjs application with no errors.
For anyone stumbling into the same problem try fiddling around with the node version you're running
npm install -g n
n 10

Different NPM version used when generating React app

When I try to create the starter React tutorial app using powershell, I get the below error:
"You are using npm 2.15.12 so the project will be boostrapped with an old unsupported version of tools".
"Please update to npm 3 or higher for a better, fully supported experience".
However, my NPM version is 6.11.3 as seen below.
What I have tried:
I have ran powershell as admin as answered in this question and restart.
I have also uninstalled and reinstalled Nodejs completely.
So after an extra hour digging around, I saw a few posts with similar (but not exactly) the same issue. I decided to install Yarn and install with that.
After install, I ran yarn cache clean and ran npx create-react-app your-app and it worked. Sorry for bothering you all.
I had the same problem. I'm running WSL with ubuntu, and yarn cache clear didn't work, but I noticed a node modules directory created in the project. I think it was messing with the node version so I deleted it. It worked

PM2 or any npm module Stuck at the start of installation

I am trying to install PM2 for node.js, But whenever i am installing it gets stuck at the very start,I tried googling it but cant find anything related to my problem,I am on Windows 10,I cannot install any module!
I reinstalled my windows and thats it,No one was able to help except telling me to update npm which i did but didnt work.

Cannot find module dtrace-provider

I have a simple nodejs application that is throwing "Cannot find module './build/Release/DTraceProviderBindings'". I look it up online and it looks like that a lot of people are having the same problem when using restify on windows (which is my case, I'm using restify on windows 10). Apparently, dtrace-provider is a optional module for restify and there is no version of it for windows. So, what I tried so far:
Update node to v6.2.0;
Uninstall all modules and run npm install --no-optional;
Uninstall only restify and run npm install restify --no-optional;
And my most desperate move npm install dtrace-provider.
Everything I tried where found on github issues, I've seen same error on OSX users with other modules. Not sure what else to try.
Note: This exception does not stop my application, not even prints the error on the console, I just notice that this was happening using the debugger, in other words, my application runs fine, but this keeps happening on the background.
List of other modules I'm using:
"dependencies": {
"restify": "latest",
"request": ">=2.11.1",
"cheerio": ">=0.10.0",
"xml2js": ">=0.2.0",
"botbuilder": "^0.11.1",
"applicationinsights": "latest"
}
This worked for me after switching to Node 6.1 (and when re-installing node modules didn't work):
Install and save dtrace-provider
$ npm install dtrace-provider --save
Delete 'node_modules' folder
Re-install node modules
$ npm install
I found this thread before combining your attempts with another solution on the Github project issues for restify (https://github.com/restify/node-restify/issues/1093) and simplified best as possible.
I recently ran into this error as well on node 6.11.1.
I ran npm rebuild dtrace-provider and that resolved the problem.
The restify team followed an approach of trying to load the module by requiring it on a try/catch block. You should just ignore the exception.
I had success with the following (elaborate) sequence:
Adjust my path to not have spaces
rm -rf node_modules
rm -rf ~/Library/Caches/node-gyp/
npm cache clean --force
V=1 npm install -S dtrace-provider#0.8.8 --python=python2.7 (repeat this step, resolving as you go, until the install is completely successful … if it fails, check the version - I had rogue dtrace-provider#0.6.0 building at one point)
npm install
At this point everything should have installed cleanly, and I was congratulating myself on a job well done. Then I executed my code and still got the DTraceProviderBindings error. The cause was nested dependencies with the wrong version of dtrace-provider (especially bunyan).
To confirm, do npm list | grep dtrace -B6.
If there's anything lower than 0.8.8, edit package-lock.json, following the method in How do I override nested NPM dependency versions?. Replace requires with dependencies for dtrace-provider and update the version.
Back round to get everything clean: rm -rf node_modules
Then, again, npm install --python=python2.7
I had to iterate round npm list a few times because I thought I'd caught everything and I hadn't.
The key points were to use the required version of python, have a unix-friendly path, and hunt down all nested dependencies. The python version issues gave a big messy error, the space issue gave a much more missable error.
I know this is an old issue but I wanted to comment on it in case anyone else has the same issue I had.
My issue was caused by having parentheses in my path.
/users/karlgroves/Dropbox (Personal)/foo/bar/bat/project...
Moving the project to a path without the parens worked for me.
You'll need to wipe out node_modules and reinstall again.
I recently ran into this error as well on node v8.8.1
as #Derek mentioned, I ran npm rebuild dtrace-provider and that resolved the problem.
tl;dr; dtrace-provider utilized node-gyp which required python version >= 2.5 and NOT 3.5
I had this issue on OSX and found a post that showed using environment variable
V=/Users/your_user/your_project npm i dtrace-provider
This let me know that there was a dependency on node-gyp that was failing to build...Once I knew the issue was with this module was able to focus my attention at troubleshooting node-gyp.
This led to some log output indicating that my python version 3.5 was unsupported and it required version >= 2.5.
Went and downloaded python 2.7.x and checked /usr/bin/python 2.7.x to ensure it was there. Uninstalled the node module that was ultimately requiring this module, then used npm cache clean then reinstalled the module and this time it appeared to pick up the right python version to be able to build.
Hope this helps someone =)
I have tried many suggestions but get the same error again.
Finally, I found the correct way to solve this question.
Go the node.js website and download the latest version of node.js pkg.
After installed, reinstall your software, everything will be ok.
i managed to get this working by running this command
npm install --python=python2.7

Resources