Hi all,
i have worked with ionic1 last year,but now when i try to developp with ionic2: i updated the new version of ionic,cordova …when i start new project (tabs) with --v2 : and try to execute it with “ionic serve” i have that errors :
because i closed the cmd page ,i have only the screenshots now ? what’s the problem with pictures ! y can’t understand the source of problem and how to resolve it ?? i can’t understand whay that “npm errors”
Error: Cannot find module 'reflect-metadata’
at Function.Module._resolveFilename (module.js:325:15)
at Function.Module._load (module.js:276:25)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object. (C:\Users\ATIA\projet2\node_modules@ionic\app-scripts
\dist\aot\aot-compiler.js:4:1)
at Module._compile (module.js:409:26)
at Object.Module._extensions…js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.require (module.js:353:17)
npm ERR! This is most likely a problem with the ionic-hello-world package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! ionic-app-scripts serve “–v2” “–address” “0.0.0.0” “–port” “8100
” “–livereload-port” "35729"
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs ionic-hello-world
npm ERR! Or if that isn’t available, you can get their info via:
npm ERR!
npm ERR! npm owner ls ionic-hello-world
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\ATIA\projet2\npm-debug.log
There was an error serving your Ionic application: There was an error with the s
pawned command: serve
Error: Cannot find module ‘reflect-metadata’
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object. (C:\Users\ATIA\projet2\node_modules@ionic\app-scripts
\dist\aot\aot-compiler.js:4:1)
at Module._compile (module.js:570:32)
at Object.Module._extensions…js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! ionic-hello-world@ ionic:serve: ionic-app-scripts serve "--v2" "--lab" "--address" "0.0.0.0" "--port" "8100" "--livereload-port" "35729"
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ionic-hello-world@ ionic:serve script ‘ionic-app-scripts
serve “–v2” “–lab” “–address” “0.0.0.0” “–port” “8100” “–livereload-port” "
35729"’.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the ionic-hello-world pac
kage,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! ionic-app-scripts serve “–v2” “–lab” “–address” “0.0.0.0” “–por
t” “8100” “–livereload-port” “35729”
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs ionic-hello-world
npm ERR! Or if that isn’t available, you can get their info via:
npm ERR! npm owner ls ionic-hello-world
npm ERR! There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\ATIA\AppData\Roaming\npm-cache_logs\2017-03-21T22_51_53_0
34Z-debug.log
There was an error serving your Ionic application: There was an error with the s
pawned command: serve
I would try completely erasing node_modules, running npm cache clean and then npm install. You may also wish to regenerate the project again, in case your old node messed up package.json.