I am getting the following error when trying to use Angular CLI on Mac OS Sierra :
$ ng new my-app Error: Path "/app/app.module.ts" does not exist. Path "/app/app.module.ts" does not exist.
I have tried the following approaches:
Deleting NodeJS completely using the following commands: ( as stated on this stackoverflow post )
sudo rm -rf /usr/local/{lib/node{,/.npm,_modules},bin,share/man}/{npm*,node*,man1/node*}
sudo rm -rf /usr/local/bin/npm /usr/local/share/man/man1/node* /usr/local/lib/dtrace/node.d ~/.npm ~/.node-gyp
sudo rm -rf /opt/local/bin/node /opt/local/include/node /opt/local/lib/node_modules
Then re-install Angular CLI
npm install -g @angular/cli
I have checked folder permissions and the information states that I have read/write access to the folder.
What else could be the problem here?
I now have the following versions:
Hope someone can help.
Ok I have solved the problem.
As well as doing all of the above. I noticed that a folder...
/Users/my-user-name/node_modules
... still existed. I did the following:
node_modules
folder found in /Users/my-user-name/node_modules
npm install -g @angular/cli
ng new my-app
Hopefully that helps anybody else who had similar issues.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.