angular-cli

Can't uninstall Angular CLI version

人走茶凉 提交于 2020-07-08 10:20:49
问题 I have been trying to create a new project in Angular6 using the latest CLI, but have been unable to update. In an attempt to resolve, I have been simply trying to remove Angular CLI and start over but even that's not working! From a random folder (without a project in it), if I run ng -v I get Angular CLI: 1.5.4 Node: 9.4.0 OS: darwin x64 Angular: ... So easily enough I try to run the following commands; npm uninstall -g angular-cli npm uninstall --save-dev angular-cli npm uninstall -g

the term ng is not recognized as the name of a cmdlet in angular [duplicate]

穿精又带淫゛_ 提交于 2020-07-08 03:44:24
问题 This question already has answers here : The term 'ng' is not recognized as the name of a cmdlet (27 answers) Closed 6 months ago . I'm very new to angular and i am learning from a project that has been developed some months back. node v is 12.13.1 npm v is 6.12.1 I'm working in windows Operating system. when i tried ng --version or ng -v or ng v it is showing "the term ng is not recognized as the name of a cmdlet in angular". But using npm list -global --depth 0 shows me that @angular/cli@8

Angular 7 : ng test hangs , keeps running tests repeatedly

我只是一个虾纸丫 提交于 2020-07-06 08:59:14
问题 i ve recently migrated my Angular 6 app to Angular 7 my package.json looks like this : { "name": "myApp", "version": "3.0.0", "license": "MIT", "scripts": { "ng": "ng", "start": "ng serve --public-host http://localhost:4200/", "build": "ng build --prod", "serve": "ng serve --optimization=true --source-map=true --eval-source-map=true --live-reload=true --aot=false --vendor-chunk=true", "build-prod": "node --max_old_space_size=5000 ./node_modules/.bin/ng build --configuration=production",

Angular 7 : ng test hangs , keeps running tests repeatedly

孤街浪徒 提交于 2020-07-06 08:57:32
问题 i ve recently migrated my Angular 6 app to Angular 7 my package.json looks like this : { "name": "myApp", "version": "3.0.0", "license": "MIT", "scripts": { "ng": "ng", "start": "ng serve --public-host http://localhost:4200/", "build": "ng build --prod", "serve": "ng serve --optimization=true --source-map=true --eval-source-map=true --live-reload=true --aot=false --vendor-chunk=true", "build-prod": "node --max_old_space_size=5000 ./node_modules/.bin/ng build --configuration=production",

Unable to uninstall angular/cli

こ雲淡風輕ζ 提交于 2020-06-29 04:31:25
问题 I tried this: npm uninstall -g @angular/cli and npm uninstall -g angular-cli Got this: up to date in 0.048s I am not able to delete angular cli I need to install angular 6.2.3 and node also unable to delete it need to install node 10.11.0 Thanks 回答1: npm uninstall -g @angular/cli (add sudo in the start if using Linux) npm cache clean --force / npm cache verify npm install -g @angular/cli add @ in front of npm package to install specific package e.g npm install -g @angular/cli@7.1.0 来源: https:

How do I prevent auto reload page when ng serve for one time?

元气小坏坏 提交于 2020-06-27 15:12:46
问题 Sometimes I make few css sketch updates in Chrome, see that it is exactly the updates I need. Then I add them to css file. And at this step, I have to save the css file. But after saving I lose my sketch updates in Chrome. It's ok if I make all changes in css file correctly. But in case I did some misprint or forget to copy some css style I have to check what did I wrong because I can't check with sketch updates in Chrome. How do I prevent auto reload page when ng serve for one time? 回答1:

Angular Build - Uncaught TypeError: Cannot read property 'id' of undefined

落花浮王杯 提交于 2020-06-27 07:09:10
问题 I have managed to build my angular app out as a dev build. I haven't done it as a production build yet as it gives me a few errors and i just need to test the dev build. The dev build process goes fine, no errors or anything. I then use the files from the dist folder in a nginx docker container to host the files. The problem is nothing is displayed but a white page and in the console i get an error saying 'Uncaught TypeError: Cannot read property 'id' of undefined'. The full message below

npm ERR! Unexpected end of JSON input while parsing near

▼魔方 西西 提交于 2020-06-24 14:42:26
问题 when creating a new angular project after running npm install -g @angular/cli I am getting the following error npm ERR! Unexpected end of JSON input while parsing near '...:"^2.1.0","ntypescrip' npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\Suraj\AppData\Roaming\npm-cache_logs\2019-06-28T06_04_16_049Z-debug.log Package install failed, see above. 回答1: Try:- As of npm@5, the npm cache self-heals from corruption issues and data extracted from the cache is guaranteed to

How to get rid of the warning .ts file is part of the TypeScript compilation but it's unused

一曲冷凌霜 提交于 2020-06-22 11:00:47
问题 I Just updated angular to latest 9.0.0-next.4 . I am not using routing but suddenly after updating I keep seeing this warning. How Do I remove this warning WARNING in src/war/angular/src/app/app-routing.module.ts is part of the TypeScript compilation but it's unused. Add only entry points to the 'files' or 'include' properties in your tsconfig. package.json "dependencies": { "@angular/animations": "^9.0.0-next.4", "@angular/cdk": "^8.1.4", "@angular/common": "^9.0.0-next.4", "@angular

Angular 2 CLI - Deployment to github user page shows readme page

别等时光非礼了梦想. 提交于 2020-06-14 04:10:37
问题 I have deployed my angular 2 project to my github user page via angular CLI. I tried out the steps from official angular 2 cli page. However when I try to access the github url it shows the contents of readme file. Both the user page and user-page/baseUrl does the same. I have used routing which works in the local environment. I’m not sure if I should modify the production environment variables or baseUrl. Link to the repository: https://github.com/nirmalks/nirmalks.github.io 回答1: You should