I installed angular 6 on my system and was trying to start a new project using command ng new project_1, but it was returning this error "cannot find module uri-js". Tried using angular 7 but same error comes. Anyone can give a solution please?
Asked
Active
Viewed 270 times
0
-
If you type this `ng -v` into your terminal what do you see – Smokey Dawson Dec 11 '18 at 05:34
-
see [this](https://stackoverflow.com/q/9023672/4400533) post! hope this helps – Iman Dec 11 '18 at 05:35
-
ng --version gives Angular cli : 7.1.2, followed by package lists – Sree Dec 11 '18 at 05:38
-
try after cleaning cache `npm cache clean -f` – Pardeep Jain Dec 11 '18 at 05:44
-
1angular app name rules, there can only be a letter after '-', like project-one. you can not use project-2 as the project name. – Abhishek Dec 11 '18 at 06:13
3 Answers
0
Did you try install it using npm? npm install uri-js
![](../../users/profiles/8690676.webp)
Bernhard
- 1,227
- 8
- 18
-
I tried it, but same error. Should I install uri in some specific folder? – Sree Dec 11 '18 at 05:38
0
Reinstalling the package might help,
npm uninstall -g @angular/cli
npm cache clean
npm install -g @angular/cli
If you are using npm>5 you may need to use cache verify instead. (npm cache verify)
use sudo before above commands if you are using Linux eg (sudo npm uninstall -g @angular/cli)
![](../../users/profiles/8740975.webp)
Akshay Rajput
- 1,495
- 5
- 15
0
Angular app name rules, there can only be a letter after '-', like project-one. you can not use project-1 as the project name.
After that u have to use this cli command:-
npm uninstall -g @angular/cli
npm cache clean or npm cache clean -f
npm install -g @angular/cli
ng new project-one
![](../../users/profiles/7321113.webp)
Abhishek
- 1,469
- 1
- 12
- 20