Terminal stuck, cannot enter git commands after npm install - npm

I have cloned a GitHub repo and ran npm install as usual (I have it installed globally)
For some reason when I run start, the terminal gets stuck in build, though it did build with parcel (dist folders are created), also I can see the live server page. I can code, I can update.
The problem is that the terminal is stuck on the error message below and I have to start a new terminal every time.
error message on terminal
Building...(node:14216) ExperimentalWarning: Package name self resolution is an experimental feature. This feature could change at any time
/ Building CSSPlugin.js...(node:8680) ExperimentalWarning: Package name self resolution is an experimental feature. This feature
could change at any time
- Building bundle-url.js...(node:14220) ExperimentalWarning: Package name self resolution is an experimental feature. This feature could change at any time
Any idea why I am getting this and how to get rid of it?
Obs.: I have attempted to delete the folder and clone again, the same issue when running npm start for the first time.

Had the same behaviour on Node.js v13.9.0.
After updating Node.js to latest stable version, the warning message is gone and everything works fine.

Related

How to fix errors in Gridsome.js?

Problem Summary
So I'm trying to launch a new Gridsome project for local development. I've toyed with Gridsome in the past and had a great experience, so I decided to give it another shot.
This time around; however, when I run the gridsome create command, the system creates a new Gridsome site directory as expected but returns the following error message:
The instructions in this error message say to enter the newly-created site directory and run gridsome develop to start local development. However, after running cd my-gridsome-site and subsequently running gridsome develop, I then receive this error:
So far, I've tried running npm install --save from the site directory as well as yarn install, both to no avail. Thinking that this was possibly tied to my terminal, I switched from using the Zsh terminal to using the Bash terminal. This also did not work.
I'm at a loss here and could really use a hand.
Thank you for helping,
David
This seems to be an environment error. Gridsome requires Node.js (v8.3+) and recommends Yarn.
Make sure your Node.js version is v8.3+ and use only one package manager like Yarn.
to check node version: node -v
I had this same issue, but I resolved it after installing yarn and running the project with yarn instead of NPM. So you should try using yarn it will help,

During "NPM I" facing error: no matching constructor for initialization of 'v8::String::Utf8Value'

I am trying to run npm i, but it gives me the error:
error: no matching constructor for initialization of 'v8::String::Utf8Value'
I got the same problem today when I picked up a project that was working 5 months ago.
The whole game is to keep your dependencies updated in package.json.
The problem happens when there is some version mismatch in your components because something has updated behind the scenes. I suggest you go one by one and start installing latest stable versions of all dependencies. I've just been able to solve the problem with my angular project.
Every time you install a latest version of the dependency, it tells you what else it needs and you go install that. You'll realise that you don't have to install everything and half of it gets updated automatically.
To solve this issue, I just updated the npm version I was using to v10.16.0, then launched the npm install command afterwards; and the error was no more.

The current npm install location C:\Users\{username}\AppData\Roaming\npm requires admin privileges to install a package

I am creating cordova app using visual studio 2015, it was working fine till last month.
I have updated the node and npm by downloading it from website.
now when i try to build the app it is giving me below error message.
I have tried whatever i can, but not able to fix the issue.
kindly help me to fix this as it is causing delay in my project delivery.
Error message:
Severity Code Description Project File Line Suppression State
Error
The current npm install location C:\Users{user}\AppData\Roaming\npm requires admin privileges to install a package. To resolve the issue, either change the ACL for C:\Users{user}\AppData\Roaming\npm or change the install path by running 'npm config set prefix %AppData%\npm' and restarting Visual Studio in order to build without being an admin. eInspection D:\eInspectionBuild\eInspection\eInspection\RUNMDAINSTALL 1
1) I have tried changing node js location into tools-->option-->external web tool
2) also tried reinstalling vs

TFS npm install Build Task Hanging?

We are using TFS Build Tasks and one of the tasks runs npm install. This is NOT through a batch or powershell file.
It runs successfully but it looks like it completes and then hangs for about 3 to 4 minutes. I know this because the task summary says it successfully completed but it doesn't start the next task for 3 to 4 minutes.
Originally when I added the task, I don't think it would hang like this. I'm not sure what changed.
I tried using npm set progress=false, recommended from this forum and explained in this article. I haven't added npm-cache because it doesn't seem to be relevant; remember, the build task completes successfully and then hangs.
What could cause the npm task to hang after completing?
According to your description, it is make sense. NPM install is just wasting time because it takes 3-4 minutes to determine the packages are already installed.
Fist try to run you npm from the console to see the performance on TFS is normal or not. If all of your NPM tasks are taking long time, one possibility is related to nodejs version.
For instance, you are using a latest version such as nodejs (8.2.0) installed on the build agent. Then downgrade to the latest LTS (long term support) version (6.11.1) may resolve the issue for you. Details please have a look at this blog.
Another way is using npm-cache as an alternative way since you use on-premise build agents for build.
It is useful for build processes that run [npm|bower|composer|jspm]
install every time as part of their build process. Since dependencies
don't change often, this often means slower build times. npm-cache
helps alleviate this problem by caching previously installed
dependencies on the build machine. npm-cache can be a drop-in
replacement for any build script that runs [npm|bower|composer|jspm]
install.
How it Works
When you run npm-cache install [npm|bower|jspm|composer], it first
looks for package.json, bower.json, or composer.json in the current
working directory depending on which dependency manager is requested.
It then calculates the MD5 hash of the configuration file and looks
for a filed named .tar.gz in the cache directory ($HOME/.package_cache
by default). If the file does not exist, npm-cache uses the system's
installed dependency manager to install the dependencies. Once the
dependencies are installed, npm-cache tars the newly downloaded
dependencies and stores them in the cache directory. The next time
npm-cache runs and sees the same config file, it will find the tarball
in the cache directory and untar the dependencies in the current
working directory.
A sample for your reference: Speed up your npm dependent CI build

npm hfc#0.6.2 not properly installing

how to solve this problem.
I run this commands make node-sdk on hyperledger/fabric folder (with sudo or without), still i am getting the same errors.
npm WARM hfc#0.6.2 license should be a valid SPDX license expression log file
this is harmless, the hfc module should still work despite the warning. By the way, if you are still developing with Hyperledger Fabric, there's a v1.0 release now. Checkout the details at hyperledger-fabric.readthedocs.io/en/latest/