All Questions
9,602
questions
401
votes
39
answers
517k
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 '......
398
votes
5
answers
536k
views
Is there a compatibility list for Angular / Angular-CLI and Node.js?
I periodically run into the problem, having to spin up old Angular projects with deprecated dependencies of Angular.
Because I unsually run the latest Node.js version (at least lates LTS version) I ...
236
votes
16
answers
632k
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 ...
215
votes
46
answers
699k
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 @...
169
votes
7
answers
94k
views
Angular 2 Karma Test 'component-name' is not a known element
In the AppComponent, I'm using the nav component in the HTML code. The UI looks fine. No errors when doing ng serve. and no errors in console when I look at the app.
But when I ran Karma for my ...
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/@...
146
votes
32
answers
419k
views
Angular - ng: command not found
I'm trying to learn Angular and my knowledge in terminal is beginner. After I installed Angular and then type ng new my-project. I get the response ng: command not found. I've seen other posts that ...
122
votes
12
answers
471k
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-...
117
votes
26
answers
282k
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",
...
110
votes
9
answers
97k
views
Missing write access in mac to /usr/local/lib/node_modules
I am trying to install angular cli but it's show me Missing write access to /usr/local/lib/node_modules
so, how can I fix it in my mac i try it may time but, not getting exact answer
npm WARN ...
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 ...
103
votes
14
answers
168k
views
Build:Cannot find type definition file for 'node'
VS 2015 community edition (at home), npm 3.10, Angular 2
Im trying to pull get Angular2 setup within an ASP.Net MVC 5 app. The template I started with used an older version of Angular, so I updated ...
92
votes
28
answers
199k
views
Angular: Cannot Get /
I am trying to open, build and run someone else's Angular 4 project but I am not able to view the project when I run it my way. I don't see what is going wrong or what I should do now. I already had ...
87
votes
3
answers
162k
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 ...
86
votes
13
answers
222k
views
How to fix Cannot find module 'typescript' in Angular 4?
I generated Angular 4 app 3 weeks ago using the @angular/cli. After 2 weeks, I tried to run it with the command line ng serve but I am prompted an error below:
Cannot find module 'typescript'
Error: ...
81
votes
21
answers
197k
views
CSS file blocked: MIME type mismatch (X-Content-Type-Options: nosniff)
I am developing an Angular 4 app and I want to apply some global styles. Following the tutorial at the angular site, I've created a "styles.css" file in the root directory of my app, and I'm ...
80
votes
7
answers
30k
views
UnhandledPromiseRejectionWarning: TypeError: Converting circular structure to JSON with Jest + Angular
Using the jest-preset-angular to perform the unit test, but got an warning as UnhandledPromiseRejectionWarning: TypeError: Converting circular structure to JSON not sure what causing the error, due to ...
78
votes
13
answers
117k
views
how to fix [Object: null prototype] { title: 'product' }
I've started learning node.js with express framework , when I post a form like this :
router.get('/add-product',(req,res,next)=>{
res.send('<form action="/product" method="...
68
votes
13
answers
98k
views
Error: Cannot find module 'webpack/lib/node/NodeTemplatePlugin'
Got this Error after running webpack. Webpack is installed globally and I'm running Node
PS D:\Projects\ng2-admin-master> ng serve
Cannot find module 'webpack/lib/node/NodeTemplatePlugin'
Error: ...
65
votes
13
answers
205k
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'
65
votes
8
answers
110k
views
Can't do a default import in Angular 9
I changed tsconfig.json by adding this properties
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
in order to be able to import a npm package import * as ms from "ms";
But I still ...
65
votes
11
answers
163k
views
How to fix: (node:12364) [DEP0111] DeprecationWarning: Access to process.binding('http_parser') is deprecated
ng serve -o shows the following error message:
- Generating browser application bundles...(node:12364) [DEP0111] DeprecationWarning: Access to process.binding('http_parser') is deprecated.
(Use `node -...
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
4
answers
72k
views
Multiple versions of node on windows
I currently have the following versions installed my windows machine.
node : v7.3.0
npm : 3.10.10
@angular/cli : 1.4.2
I would like to install latest versions of the above and be able to switch ...
61
votes
13
answers
122k
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
60
votes
6
answers
121k
views
Angular 7: Uncaught ReferenceError: global is not defined when adding package
I am building an Angular 7 app, and when i add a package npm install dragula --save and import this into the pollyfills.ts file i get this error:
index.js:2 Uncaught ReferenceError: global is not ...
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 ...
58
votes
13
answers
81k
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 ...
57
votes
1
answer
22k
views
Difference between module type in tsconfig.json
In tsconfig.json
{
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"moduleResolution": "node",
"sourceMap": true,
"emitDecoratorMetadata": true,
"...
56
votes
15
answers
400k
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\...
53
votes
12
answers
69k
views
NOT SUPPORTED: keyword "id", use "$id" for schema ID : TSLint (ng add @angular-eslint/schematics)
I am upgrading my Angular 10 application to Angular 13. I did well with other compatibilities of dependencies. The project is compiling and working fine. Now the time for TSLint I tried to update the ...
52
votes
7
answers
8k
views
How to debug Angular universal?
I am using Angular Universal Starter repo. In angular 4 universal for ssr we could debug browser and node part of application in dev mode(see console), but now I do not see way to debug node part. I ...
51
votes
16
answers
150k
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
4
answers
34k
views
Why do we have install Node.js for Angular 2.0?
I started a tutorial on Angular 2.0, the first step in setting up the workspace is installing Node.js and NPM.
Why do we have install Node.js for Angular 2.0?
I don't remember doing this for angular ...
50
votes
22
answers
399k
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 ...
46
votes
8
answers
165k
views
Error: TSError: ⨯ Unable to compile TypeScript
I am facing the problem:
My Project is built on Angular4 with typescript, e2e testing with protractor & karma.
Travis-ci has this error:
[03:34:54] E/launcher - Error: TSError: ⨯ Unable to ...
46
votes
8
answers
101k
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 ...
44
votes
4
answers
24k
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 ...
43
votes
13
answers
217k
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 ...
43
votes
7
answers
34k
views
Hooking up express.js with Angular CLI in dev environment
I found a great tutorial that explains how to setup express.js with Angular CLI, but in this tutorial the angular app is compiled into a production dist folder:
https://scotch.io/tutorials/mean-app-...
43
votes
13
answers
36k
views
Why am I suddenly getting "Could not read source map" in VSCode using Angular with NodeJS 17 and above?
I suddenly can't debug my Angular Application. Not quite sure what I did. It might have happen after I updated node.js
Angular: 13.1.1
NodeJS: 18.1.0
VSCode: 1.67.1
Launch.json
"configurations&...
43
votes
2
answers
86k
views
'Access-Control-Allow-Credentials' header in the response is '' which must be 'true'
I'm using node, express on backend and angular4 at client side which is giving me following error:
XMLHttpRequest cannot load http://localhost:4876/login/check. Response to preflight request doesn'...
41
votes
15
answers
112k
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
48k
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
116k
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": "...
40
votes
5
answers
12k
views
Navigation Error in angular2
I have updated the angular packages version from 2.4.10 to 4.0.0 after updating i am getting the following errors while navigating.
ERROR Error: Uncaught (in promise): Error: Found the synthetic ...
39
votes
3
answers
33k
views
Npm "scripts": "start" run express and open url
I have this entry in package.json
"scripts": {
"start": "node bin/www"
},
It runs my Express app when I enter the command npm start.
But I also want a browser to ...
38
votes
7
answers
256k
views
Unable to get Angular CLI version, though all the requirements are installed?
I am having difficulties doing anything with the Angular CLI. I have Node, NPM. and Angular all installed, when I run the which command in the terminal they all exist in my /user/local/bin
This is my ...
38
votes
4
answers
4k
views
Rails upgrade to angular 2
I would like to upgrade my existing Rails and Angular 1.x application. I'm following the ng-upgrade documentation and seeing that there are many dependencies including systemjs, typescript, tsd and a ...