Npm Run Script Issues Running ( Blank Line After Running & No Errors) - npm

I logged into my codebase and tried to run a script. onEnter it doesn't run or give any errors but shows a blank line beneath. everything was working fine until I restarted it. The only things I've edited have been in a Vue file which shouldn't affect anything?
( image below )
Ive tried:
- installing npm and I've looked Here on a similar issue.
- updating and it has updated, the test command gives the same result.
- reinstalling node and the issue persists.
- running the commands in different terminal

A few days ago watching a Coding Tech video they recommended running npm config set ignore-scripts true to prevent hackers when installing npm libraries etc. However... this prevents you from running ANYTHING. run npm config set ignore-scripts false and it should be fixed. DAMN.

Related

What causes the npm error {errno: -4094, code: 'UNKNOWN', syscall: 'readlink'}?

I have been happily building a next.js app over the last couple days without error. Today I installed the firebase npm and suddenly I am getting a strange error when I try to run "npm run dev?
ready - started server on 0.0.0.0:3002, url: http://localhost:3002
[Error: UNKNOWN: unknown error, readlink 'C:\...\seo-site\.next\server\pages\_document.js'] {
errno: -4094,
code: 'UNKNOWN',
syscall: 'readlink',
path: 'C:\\...\\seo-site\\.next\\server\\pages\\_document.js'
}
Even if I uninstall firebase and roll the entire project back to a working build I still get the same error. If I try to run this "broken" build on another computer with the same version of node and npm it runs completely fine. I've tried running npm cache clean --force and npm install -g npm#latest --force several times without any luck.
I have noticed that as I change things I get the error with a different path. Sometimes it's \webpack-runtime.js sometimes its \errors.js and somethimes it's \pages\_document.js'
I cant find anything online or on stack overflow for an error matching this errno or syscall. Has anyone experienced this before or know what is causing this?
deleting the .next file and running npm run dev fixed the issue. I am not sure why this worked but I think it has something to do with next.js trying to use parts of a previous build when you make updates that are causing errors. deleting folder forces next to rebuild everything again.
I tried to go back directories from command line and then reentered into the workplace directory and tried npm run dev. Worked for me.
Right-click the project folder and from the menu choose "Open in integrated Terminal". Then try to run "npm run dev". If it still doesn't work, go back one folder with the command "cd .." and then go back again to the project folder with "cd project folder name". Try running "npm run dev". It worked for me on both occasions. Hope this helps.
Solved by restarting VS Code 🤔
Error occurred seemingly out of nowhere, when restarting the local server with 'npm run dev'. Just doing minor CSS changes to a component in the Nextjs project.

Npm install makes Windows crash

Generally when I run npm install sometimes my pc crashes and shows the screen like the image below. I’ve tried removing both the package-lock.json and node_modules. I’ve also run the commands npm rebuild -g and npm cache clean -f.
2 days ago I reinstalled my pc to fabric settings and it still doesn’t help.
I’m using WSL, nodejs v12.10.0 and npm 6.10.3.
Anyone knows what’s up and could help me?
https://imgur.com/a/762AdrR
Update
I've been using yarn instead of npm since 3 months back and this problem has never occured again. So if you are experiencing the same problem as me, try it out.

'EPERM: operation not permitted' error when building Nuxt app

Getting one of the following intermittant errors when running npm run dev:
EPERM: operation not permitted, mkdir 'D:\projects\my_project\.nuxt\components'
EPERM: operation not permitted, lstat 'D:\projects\my_project\.nuxt
I tried npm cache clear to no avail. Some people attribute this issue to npm install folders shared on some network, not my case.
Note: this is a random issue. I just tried again after a couple hours and now it works. But when creating this question, it never worked no matter how many times I tried.
Any idea?
I had the same issue. I believe is related on VS Code.
I closed VS Code and stopped my console.
I rebuild Nuxt with 'npm run dev' and reopen VS Code.
Now is working.
To solve this issue is only
Stop dev, Close your CMD and Open CMD again and last you can npm run dev again
Hope this will help you :)
Same issue. I'm on windows with VS code. Closed terminal and run again with administrator, then it worked. Permission issue.
first close the vscode and the bash or cmd runner the project
then
just remove the ".nuxt" directory form root your project
I am using webstorm, and this problem also happened to me. I closed my terminal, then I closed webstrom and opened my IDE again and npm run dev. It solved my problem and maybe it can solves yours.
I was running Nuxt inside Docker, and it seemed that this issue was caused by my Docker images using up all the allotted space.
After cleaning up Docker images and containers, things started working again when I reinstalled.
Edit:
Never mind, this issue happens when I change branches with git. Fixing it is simply about restarting Docker.
For me the issue was that the file rights were given to root rather than to my user.
I fixed it using the command:
chown -R <user>:<group> .nuxt
Make sure to replace the <user> and <group>.
In my situation, dev script was already running so it prevented build script to access that directory.

How to stop angular-cli freezing on "loadRequestedDeps: silly install loadAllDepsIntoIdealTree"?

I am running Windows 8.1 with node version 7.7.3 and npm version 4.1.2.
I have been working on an Angular tutorial without issues. At some point since finishing that tutorial I installed Python. I am not sure if it is related, but I have mentioned it just in case.
Today I am trying to create an Angular application and it hung without completing.
I did some research and it tells me to do this:
npm uninstall -g #angluar/cli
npm cache clean
npm install -g #angular/cli
The last command hangs at this point:
loadRequestedDeps: silly install loadAllDepsIntoIdealTree
I opened the command prompt "run as administrator" to run these commands.
Everything I try fails. I have connected to a completely different network to eliminate that as the problem and that didn't fix anything. I have uninstalled and reinstalled node.js and that hasn't fixed the problem either.
I can ping registry.npmjs.org just fine.
What is causing this error?
I finally found the answer! I ran the following command in the command window:
echo %temp%
It had 3 temp paths in there. I removed the two I didn't need and voila, it works!

Can't install Semantic-UI via NPM

I've been trying to install Semantic via NPM for a while now and am having problems. I run npm install semantic-ui and it goes through the setup process. However, it stops at Finished 'install' after 3.61 s and never exits the process. If I manually cancel the process and navigate to the semantic folder and run gulp build I'm told there's no local gulp found. So I run npm install gulp just for fun. It installs and I run gulp build again but all of the gulp dependencies are missing.
Any ideas? It's getting frustrating because I've been tinkering with it for a few hours instead of getting to work on the actual project. Running npm install in the semantic directory or my project directory doesn't work either. Thanks for the help!
EDIT: I tried creating a new Ubuntu VM and installing Semantic the same way I was on my Mac. It worked with no problems leading me to believe it's something to do with my configuration on my Mac.
This is really odd, but after I got to the Finished 'install' step, nothing was happening. Just a solid cursor when the node deps should've been installing. I decided to hit return just to see if anything would happen and that seems to have done it. Hitting return gives me the spinning cursor and the deps install. I can successfully run gulp build after that. Weird.