Error while installing project dependency in aurelia js - node.js

Hello all I am new to aurelia js . I installed aurelia js through command line using npm install aurelia-cli -g command successfully.
After successful installation , I created one project using command au new , But when I am installing dependencies using command npm install I am getting error as below.
npm ERR! Unexpected end of JSON input while parsing near '...0.1.10"},"devDependen'.
Also I tried it after updating node version but nothing works. I am using below version of node and npm in windows
Node : 10.16.3
NPM : 6.9.0
Any help is appreciated.

This sometimes happens with CLI driven generators. Try the following:
npm cache clean --force
Then:
npm i aurelia-cli -g
You may need to reinitialise your Aurelia Application after doing this.
To further clarify, if the above doesn't work could you post a link to your package.json in a pastebin?

Related

npm WARN deprecated #npmcli/move-file#2.0.1: This functionality has been moved to #npmcli/fs

While installing Angular cli using the command:
npm install -g #angular/cli
I am getting this warning.
I am using node version 16.17.0 and npm version 8.19.2
I wanted to install angular cli. But ng command not working
Try the command 'ng v' and check if it asks any question about sharing data about this project with the Angular Team at Google google or any question at all about google say N as no. If it shows angular versions then it means angular/cli is installed
To solve this problem perform following steps:
npm uninstall -g #angular/cli
npm cache clean --force
npm cache verify
npm install -g #angular/cli
ng version
After this moment if you see that powershell is not allowing to execute the script
follow following steps from this site:
Chaman Gautam
and then run ng version(or any ng command you will be able to)
if you see angular
you are good to go !!!
I had the same problem recently. I tried uninstalling angular and reinstalling it but there were already 'ng' files at the location:
C:/Users/<your_user_name>/AppData/Roaming/npm
To resolve the issue, go to that npm folder and delete the following files:
ng
ng.cmd
ng.ps1
Once these files are removed, reinstall angular cli. Follow the guide here to clear the cache and do a clean install:
[https://www.javatpoint.com/uninstall-and-reinstall-angular-cli][1]
The ng command should work now. Check with the below command
ng --version
References:
[1]: https://www.javatpoint.com/uninstall-and-reinstall-angular-cli

Vue create doesn't work - No output from console or Vue UI

As the title states. I can not get the Vue CLI to work. I've tried vue create hello-world. This returns no output. I've also tried vue ui which returns 🚀 Starting GUI... but nothing else.
I've tried.
vue create not working when creating new project in cmd
along with countless others. Clearing npm cache. Setting npm proxy to null then false.
Disconnecting from the internet and running the following commands:
npm uninstall -g vue
npm uninstall -g vue-cli
npm uninstall -g #vue/cli
npm cache clean --force
npm install -g vue
npm install -g #vue/cli
npm audit fix --force
In almost all of the other issues. They get some output to the command line. I can not get anything.
Specs
Windows 11 20H2 Build 22000.739
NodeJs ver: 16.13.2
Vue Cli: Latest
Please make sure node latest version is installed in your machine.
node -v
Then, Download vue from npm registry
npm init vue#latest
Check out Official Docs for more information.

Error " ERR_OUT_OF_RANGE" when using npm install

I tried to create a new NodeJs project, when i ran "npm init" the package.json was created successfully but when I tried to run "npm install express" it showed "npm ERR! code ERR_OUT_OF_RANGE". I am not able to run npm install without getting this error.
I tried to install other packages, i tried sudo, and I removed npm/node and reinstalled nvm/node but it is still the same.
Thank you for your help !
npm install express
npm ERR! code ERR_OUT_OF_RANGE
npm ERR! The value of "err" is out of range. It must be a negative integer. Received 536870212
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/me/.npm/_logs/2019-09-18T14_49_07_222Z-debug.log
The issue is a mismatch between your versions of Node and NPM.
This can occur when one is updated without the other.
To prevent these issues, use nvm to manage your Node version:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.1/install.sh | bash
# Example: Selecting Node v13
# For complete list of available versions run `nvm ls-remote`
nvm install 13
nvm use 13
This will select matching versions of Node and NPM.
This error was caused by a the most recent version of node which was 12.10.0, when I installed and used the 10.16.0 version of node, the error was gone.
i ran into something very similar with react native - metro and it seems I just had to deactivate my firewall LULU.

How to resolve this gulp watch issue [duplicate]

I am trying to start my angular app using grunt serve command
but I am getting Fatal error: spawn cmd ENOENT.
I used following commands to generate my Angular App
npm install -g yo grunt-cli bower
npm install -g generator-angular
yo angular
npm install
bower install
then i used grunt serve command to start my app
but its not working.
System Info:
OS: Windows 7 64 bit
npm version : 2.11.3
please help me, I gone through all the grunt documentation but no clue.
Try the following possible solutions:
Verify the npm folder exists at the following location C:\Users\My-UserName\AppData\Roaming\npm
Try to run npm cache clean
Add C:\Windows\System32\ to the PATH Environment variable
Run grunt serve with cmd.exe instead of git bash. I have the same problem and have dealt with it in this way.

Unable to start angular4 app using ng serve

I am executing following command in my angular 4 app,
ng serve
But i am getting the following error message,
This version of CLI is only compatible with angular version 2.3.1 or
better. Ple ase upgrade your angular version, e.g. by running:
npm install #angular/core#latest
my angular cli version is 1.6.8.
Even i executed the above mentioned command to update my angular cli, but still same error is getting reported.
Perform Following steps:
1. perform npm cache clean --force
2. Reinstall Angular CLI globally using following command:
npm install -g #angular/cli
3. Delete 'node modules folder' and perform npm install for your project and try running it with npm start/ng serve
From the github issue here: https://github.com/angular/angular-cli/issues/5558
The project needs a dev dependency for #angular/compiler-cli.
npm install --save-dev #angular/compiler-cli#<your angular version>
If that doesnt work you can try this:
npm install --save-dev #ngtools/webpack#1.2.13
One of the main contributors of angular-cli said that it is an issue with older webpack versions, reading the github thread should provide some more insight
To resolve the angular cli error, please try following steps :
npm uninstall —save #angular/cli
npm cache clean
npm install —save #angular/cli

Resources