"Firebase running scripts is disabled on this system" - node.js

I have installed the firebase tools, however whenever I try to initialize it in my rootfolder, using the terminal from Vscode, I receive the following error.
firebase : File C:\Users\User\AppData\Roaming\npm\fi
running scripts is disabled on this system. For more
about_Execution_Policies at https:/go.microsoft.com/
Why is that?

Here is the answer to your question, Hope will help you, Thanks.
Answer

Delete the firebase script where npm is located.

Related

Beginner Working Through Authentication (Node.js example)

Currently working through some of the documentation examples from Jack Henry and I've ran into an issue on the Authentication (Node.js) example project (https://jackhenry.dev/open-api-docs/consumer-api/quickstarts/authentication/)
For reference, here is the git repository being used https://github.com/Banno/consumer-api-openid-connect-example
I have Node.js/npm installed locally and after using "npm install", when I try to use "npm start", I get an error. Screenshot of Error
> #banno/consumer-api-openid-connect-example#1.0.0 start
> ENVIRONMENT='local' node server.js
>'ENVIRONMENT' is not recognized as an internal or external command,
>operable program or batch file.
I've not modified any of the package.json file where this line is located, which is throwing the error.
Any suggestions as to what could be the issue? Thanks!
The Node.js examples more or less assume a *nix-compatible operating environment (e.g. Linux, Unix, macOS) and apparently do not work on vanilla Windows.
The suggestions above from other folks for working around how to set up the command line variable or using cross-env might be good to try.
It might also be worth considering using Windows Subsystem for Linux to get that *nix-compatible operating environment.
It looks like Microsoft has some documentation on how to Install Node.js on Windows Subsystem for Linux (WSL2).

Node cannot run serverless cmd

I tried updating both Serverless module and Node, but still receives the same error.
I count not even find the solution in the internet for this simple problem.
can someone suggest.
The issue for me was that I was missing the following directory in my Windows PATH env variable:
%AppData%\npm
Once I added that I could run serverless, SLS, etc.
Don't forget the restart your PC.

Why does PM2 work on one server, but not on another?

We have two instances of our Node-Express app: one for development, and one for production. We are implementing PM2 process manager. This is for a Windows Server 2012 environment.
For some baffling reason, PM2 (with pm2-windows-service) worked fine when set up in our dev environment, but won't even run node in our Prod environment. What could be the cause?
Log files reveal nothing helpful
If you look at my related question, you can see that PM2 appears to be launching node, but is not (or it instantly crashes).
All we can conclude is there is some difference in settings between these two servers. Any clue what difference in settings might be causing PM2 to fail like this?
This is related to a more specific question I have out there about issues we're having implementing PM2.
Thank you!
Ok, I got the answer after posting an issue to the pm2 github issues page.
Sharing it here in case anyone else finds themselves in this situation:
https://github.com/Unitech/pm2/issues/4113
(basically pm2 3.2.5 introduced a bug that causes this issue in Windows. My QA install was 3.2.4. The issue was resolved by reverting to 3.2.4. Simple process, see instructions at link above.)
It may be not really pm2 issue, bit more npm. On the server where pm2 doesn't work please try that command in PowerShell:
Get-Command pm2
Does it return the correct version(not 0.0.0)? If not, there is an issue diring installing that package, so as an option it's possible to install that manually. Also we asked familiar question in that ticket last month:
https://github.com/Unitech/pm2/issues/3964
Like it described in a ticket above you can try to check other npm package with familiar issues:
npm install mocha -g
And that try to reach mocha-cli

Issues running React app on Windows environement

I have a working react app that I had hosted on a linux environment, but the client has switched their hosting provider and now I have to run the app on a Windows environment. I personally am unfamiliar with Windows and having some serious issues getting my app to work now.
After loads of debugging and testing I now can get my app to run, but when I start it, it will throw some errors which will results in a broken app in the browser.
So when I run npm start it will start up the app and spit out this error:
Screenshot of the terminal error 1/2
Screenshot of the terminal error 2/2
It seems to spit out some complaints when using npm run watchJS which runs this command babel src --watch --out-dir lib.
I am completely lost at this point and have no idea where to go from here.
I can provide as much detail as anyone needs after looking at the question, I just don't know what else to add to this issue and don't want to fill up this question with irrelevant info.
Thanks in advance for any help
It is likely a bug with the version of npm you are using.
See this thread:
https://github.com/npm/npm/issues/18380
Try rolling back your version of npm to 5.3
The issue appears to be exclusive to windows with babel packages.

Node.js error when starting with npm

I am getting error below after I tried to start node.js. Does anyone know the possible solution to the error below. I haven't used node.js at all. Please help!
http://i.stack.imgur.com/eri49.png
If you open the terminal as administrator before running the command the issue should be resolved

Resources