All Questions
4,220
questions
770
votes
36
answers
1.6m
views
Unable to resolve dependency tree error when installing npm packages
When trying to install the npm packages using npm i command, I am getting the following exception:
I have tried reinstalling the Node.js package and setting the proxy to off using:
set HTTP_PROXY=
...
662
votes
4
answers
118k
views
What is the meaning of the "at" (@) prefix on npm packages?
In the Angular Component Router documentation I just stumbled over a npm command I have never seen before and I don't understand what is going on:
npm install @angular/router --save
What is the ...
414
votes
16
answers
689k
views
npm WARN ... requires a peer of ... but none is installed. You must install peer dependencies yourself
I tried to run a project downloaded from github. Unfortunately, during npm install the following warnings were shown. I tried to change the version based on this question. However, I had a problem, ...
402
votes
39
answers
521k
views
NPM Install Error:Unexpected end of JSON input while parsing near '...nt-webpack-plugin":"0'
When creating a new Angular 5 project:
node version: 8.9.2
npm version: 5.5.1
My Command is:
npm install -g @angular/cli
The Error is:
npm ERR! **Unexpected end of JSON input while parsing near '......
237
votes
16
answers
650k
views
Checking version of angular-cli that's installed?
Is there a way to check the specific version of angular-cli that's installed globally on my machine? I'm in a Windows environment.
*npm -v* and *node -v* only gives me the version of npm and node ...
220
votes
46
answers
728k
views
Message "the term 'ng' is not recognized as the name of a cmdlet"
Today, while working through some basic AngularJS introduction, I ran into a problem.
I opened PowerShell to get going on the project. NPM worked.
I was able to install Angular using:
npm install -g @...
209
votes
42
answers
446k
views
ng: command not found while creating new project using angular-cli
Installed angular-cli globally using (npm install -g angular-cli) but when I'm trying to create project using ng new my-project it is throwing error:
ng: command not found
184
votes
16
answers
134k
views
unable to resolve dependency tree error for creating new angular project
so today I wanted to create a new Angular project using the command ng new <projectname> and I got this error:
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While ...
179
votes
9
answers
169k
views
ERROR in The Angular Compiler requires TypeScript >=3.1.1 and <3.2.0 but 3.2.1 was found instead
I am getting this error
ERROR in The Angular Compiler requires TypeScript >=3.1.1 and <3.2.0 but 3.2.1 was found instead.
Seems like Typescript updated but the Angular Compiler doesn't like ...
153
votes
12
answers
109k
views
An unhandled exception occurred: Job name "..getProjectMetadata" does not exist
When I start to run my Application, I get this error:
**[error] Error: Job name "..getProjectMetadata" does not exist.**
at Observable._subscribe (/Users/vasil/KSS/kssfrontend/node_modules/@...
152
votes
12
answers
82k
views
Job name "..getProjectMetadata" does not exist
I updated my angular to v9 and when I try to go back in v8, I receive this error.
I have already tried the following:
uninstall -global angular/cli
uninstall angular/cli
go back to my last package....
151
votes
29
answers
218k
views
You seem to not be depending on "@angular/core". This is an error
I want to create an angular 2 App with angular cli
I have written in the cmd:
npm install angular-cli -g
then:
ng firstngapp
but it show me an error when I write npm start !
I don't ...
136
votes
19
answers
198k
views
npm install ->Failed at the [email protected] postinstall script
I'm trying to do npm install and an error appears :
Failed at the [email protected] postinstall script.
I tried to delete node_modules and then reinstall it, same error appears.
what will be the ...
126
votes
12
answers
496k
views
Could not find the implementation for builder @angular-devkit/build-angular:dev-server on ng serve command [duplicate]
I tried to update the angular CLI following this, but now I can't run my app. When I try to run the command ng serve, it gives me this error:
Could not find the implementation for builder @angular-...
125
votes
11
answers
165k
views
How do I correctly upgrade angular 2 (npm) to the latest version?
Recently I started Angular 2 tutorial at https://angular.io/docs/ts/latest/tutorial/.
and left off with Angular 2 beta 8.
Now I resumed the tutorial and latest beta is beta 14.
If I simply do npm ...
119
votes
26
answers
297k
views
Module not found: Error: Can't resolve 'crypto'
I am getting the following list of errors when I run ng serve.
My package JSON is as follows:
{ "name": "ProName", "version": "0.0.0", "scripts": {
"ng": "ng",
"start": "ng serve",
...
108
votes
8
answers
138k
views
How to Create a specific version of Angular Project using CLI?
My npm version is 5.5.1 and angular cli version is 6.2.1. When I try to create a new project using the command ng new Project_name then it is creating the latest version of Angular (in my case it is ...
107
votes
32
answers
118k
views
Angular2 QuickStart npm start is not working correctly
I know Angular2 beta has just been released but I can't reproduce the steps from their official site tutorial ( https://angular.io/guide/quickstart ). Maybe someone has had similar issues and knows ...
92
votes
7
answers
174k
views
punycode is deprecated in npm - what should I replace it with?
I'm using the npm module punycode in my Angular project.
VsCode tells me it's deprecated and https://nodejs.org/api/punycode.html#punycode_punycode
confirms:
The version of the punycode module ...
88
votes
3
answers
167k
views
Npm install gives warnings, npm audit fix not working
I am working on an angular app with a .net core web api.
When I cloned this repository, I tried to run npm install on the angular application, but I got a strange error:
npm install
npm WARN ...
82
votes
3
answers
37k
views
Difference between ng add <package name> vs npm install <package name> in angular 6
As Angular6 has been released,
They have added a new command ng add . Can anyone tell me what will be the difference between existing command npm install <package> and ng add <package>
75
votes
3
answers
120k
views
How to import CSS from node_modules in webpack angular2 app
Let's say that we start with the following starter pack:
https://github.com/angularclass/angular2-webpack-starter
After npm install and npm run start everything works fine.
I want to add an external ...
74
votes
3
answers
52k
views
How do I add Sass compilation in Angular CLI 6: angular.json?
I just created a new Angular project using the new Angular CLI 6.0, but I need to add Sass compilation to my project. I'm aware you can set a flag when you create a project, but my project is already ...
66
votes
14
answers
221k
views
Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/node-sass/build'
I am trying to run an Angular application. I execute the ng serve command, but it then shows:
Error: Cannot find module 'node-sass'
66
votes
24
answers
162k
views
npm ERR! code ERR_SOCKET_TIMEOUT on creating new project using ng new appname
Can somebody help me on this? i am getting following error:
Angular & Node version Installed
Angular CLI: 12.0.1
Node: 14.16.0
Package Manager: npm 7.11.2
OS: win32 x64
D:\Learning\Angular>...
66
votes
9
answers
103k
views
"You seem to not be depending on "@angular/core"."
When I try to build my project running the following command:
ng build --environment=prod --aot=false --output-path="..." --base-href="..."
You seem to not be depending on @angular/core.
This is ...
66
votes
3
answers
143k
views
Install specific version of ng cli
I'm using angular 2.4.9 for my application development so I need to use specific version of ng cli instead of the latest one.
I know the below command will install latest version of ng cli
npm ...
66
votes
19
answers
64k
views
Angular 2 Routing Does Not Work When Deployed to Http Server
I am going to develop a simple Angular 2 application. I have created a project with routing, using Angular CLI and added several components to the app using 'ng generate component ' command. Then I ...
65
votes
1
answer
46k
views
Lint error: Implement lifecycle hook interfaces
I got a linting error and I am not sure what it is talking about, this is the error:
src/app/particles/particles.component.ts[4, 1]: Implement lifecycle
hook interfaces
(https://angular.io/docs/ts/...
64
votes
11
answers
79k
views
Angular 6 many Can't resolve errors (crypto, fs, http, https, net, path, stream, tls, zlib)
I'm building an Angular 6 app, but every time I want to serve to localhost, I get these errors:
ERROR in ./node_modules/aws-sign2/index.js
Module not found: Error: Can't resolve 'crypto' in 'C:\...
62
votes
14
answers
127k
views
ANGULAR - Error: You need to specify a command before moving on. Use '--help' to view the available commands
I am facing the issue ,
Error: You need to specify a command before moving on. Use '--help' to view the available commands
everytime while using any of the ng command
62
votes
9
answers
126k
views
When upgrading Angular 5 to 6, I get incompatible peer dependency (using ng update @angular/core)
I am trying to update my Angular app from v5 to v6 following this guide.
I have ran all these commands successfully:
npm install -g @angular/cli
npm install @angular/cli
ng update @angular/cli
The ...
61
votes
13
answers
86k
views
Unexpected token '.' when trying to run 'npm install'
I am trying to install the angular cli with 'npm install -g @angular/cli' and I am met with the following error:
npm ERR! Unexpected token '.'
npm ERR! A complete log of this run can be found in:
npm ...
59
votes
10
answers
49k
views
Error: npm ERR! write after end
I am having issues installing Cordova and Ionic.
At first I couldn't because of what seems to be a corrupted installation, that led me to uninstall NodeJS - Cordova - Ionic.
Now, I've reinstalled ...
56
votes
11
answers
135k
views
Module not found: Error: Can't resolve 'net' in 'node_modules/stompjs/lib'
Got an issue where a stompJS-lib was not found, upon which I got the following error message:
Module not found: Error: Can't resolve 'net' in '/../../../.../../../angular-app/node_modules/stompjs/lib'...
56
votes
15
answers
416k
views
What could cause an error related to npm not being able to find a file? No contents in my node_modules subfolder. Why is that?
I'm trying to run npm install in the angular project folder I got from ASP.NET Boilerplate and I'm getting an error that is "related to npm not being able to find a file."
D:\Dev\...
56
votes
9
answers
67k
views
The Angular Compiler requires TypeScript >=2.7.2 and <2.8.0 but 2.8.3 was found instead
I starting getting this error on my Angular app:
The Angular Compiler requires TypeScript >=2.7.2 and <2.8.0 but 2.8.3
was found instead
and when I try to downgrade typescript to the right ...
53
votes
5
answers
41k
views
Is there a way to specify angular version with the ng new command
I am creating a new Angular project and would like all the Angular dependencies to be from the stable 7th version. However, it seems that while running the ng new app command the Angular always ...
52
votes
11
answers
201k
views
The command "npm run build -- --prod" exited with code 1 error
I'm developing an Asp.Net Core 2 and Angular 5 project in visual studio 2017.
When I'm going to publish my project then the error 'The command "npm run build -- --prod" exited with code 1' show in ...
51
votes
16
answers
152k
views
Cannot uninstall angular-cli
I've tried several times to uninstall my angular-cli in order to update it but even if I follow the instructions provided on github:
npm uninstall -g @angular/cli
npm cache clean
npm install -g @...
51
votes
22
answers
405k
views
error: This is probably not a problem with npm. There is likely additional logging output above
In my project, I'm using Angular6 for the frontend. Now what I'm trying to do is deploy my project which is in remote server into the actual server. I'm using npm run build -prod command to build the ...
48
votes
11
answers
65k
views
How to use bootstrap 4 in angular 2?
I'm building an angular 2 app written in typescript. It would use the bootstrap 4 framework in combination with some custom theming, is this possible?
The "ng2-bootstrap" npm package is not working ...
45
votes
26
answers
185k
views
ENOENT: no such file or directory, lstat '/Users/Desktop/node_modules'
An unhandled exception occurred:
ENOENT: no such file or directory, lstat
'/Users/Desktop/node_modules'
See "/private/var/folders/3p/l_k1wk8n76v3cfwnxk0blx000000gn/T/ng-
DF5EZ7/angular-errors....
45
votes
5
answers
26k
views
How to upgrade minor version of angular using angular cli
This is a simple question but I'm struggling to find the answer via Google...
I have an angular 4 project (created using angular cli) and would like to make use of http interceptors that have just ...
44
votes
12
answers
6k
views
Angular CLI gives me "TypeError: callbacks[i] is not a function" when I "ng serve"
I literally just made a fresh installation of the Angular CLI in order to try it out and I don't have a clue on what's causing the following error on the command line:
PC:cobros Fran$ ng serve
** ...
43
votes
13
answers
218k
views
ERROR in ./node_modules/css-loader?: ENOENT: no such file or directory node_modules/node-sass/vendor
I was trying to run an angular project in windows 10. It is the same project that I am doing in Ubuntu. When I clone the repository and install all the node packages I encountered this error.
ERROR ...
42
votes
15
answers
118k
views
Error with npm install - a pre-gyp error
I wanted to install this angular 2 calendar using npm. Tried to use npm to install it and then downloaded it and tried to install it. In both cases its failed.
I am on windows and I previously got ...
40
votes
7
answers
49k
views
Cannot find module 'ngx-bootstrap'
I'm having an issue in my application with ngx-bootstrap whereby it now can't detect the module unless you specify the path
For example:
import { BsModalService, BsModalRef } from 'ngx-bootstrap';
...
40
votes
12
answers
118k
views
npm install: Failed at the [email protected] postinstall script
I have a angular application: https://github.com/XBITSwitzerland/ngx-admin/tree/ng2-admin
And now I try to do: npm install
But I get this error (The compete Output of the command was way too long, ...
40
votes
9
answers
53k
views
Update to Angular 5
How to update to Angular 5?
This is from my package.json:
"dependencies": {
"@angular/animations": "5.0.0",
"@angular/common": "5.0.0",
"@angular/compiler": "5.0.0",
"@angular/core": "...