Ionic version: (check one with "x")
[ ] 1.x (For Ionic 1.x issues, please use https://github.com/ionic-team/ionic-v1)
[ ] 2.x
[ x] 3.x
I'm submitting a ... (check one with "x")
[ x] bug report
[ ] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or http://ionicworldwide.herokuapp.com/
Current behavior:
I made a new project, then ran: ionic g page login.
I got:
[ERROR] Error with ./node_modules/ionic-angular/package.json file: FILE_NOT_FOUND
Error: Cannot find module 'reflect-metadata'
Note that I got this error with ionic info as well.
Expected behavior:
It would generate a new page.
Steps to reproduce:
Generate a new page via the CLI.
Other information:
Ionic info: (run ionic info from a terminal/cmd prompt and paste output below):
[ERROR] Error with ./node_modules/ionic-angular/package.json file: FILE_NOT_FOUND
global packages:
@ionic/cli-utils : 1.4.0
Ionic CLI : 3.4.0
local packages:
@ionic/app-scripts : 1.3.11
@ionic/cli-plugin-ionic-angular : 1.3.1
Ionic Framework : not installed
System:
Node : v8.1.2
OS : Linux 4.4
Xcode : not installed
ios-deploy : not installed
ios-sim : not installed
npm : 5.0.4
I'm having the same problem.
I had the same problem. For me the following fixed it:
rm -r node_modulesrm package-lock.jsonnpm installHello, thanks for using Ionic! @danbucholtz fixed this last night. This was caused by a classic "dependency of a dependency" issue that npm 4 allowed you to get away with but npm 5, rightly, complains about. If you start a new project now things work swimmingly. Thanks, everyone!
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.