[20:05:52] build dev started ā¦
[20:05:52] clean started ā¦
[20:05:52] clean finished in 1 ms
[20:05:52] copy started ā¦
[20:05:52] transpile started ā¦
[20:05:54] transpile finished in 2.61 s
[20:05:54] preprocess started ā¦
[20:05:54] deeplinks started ā¦
[20:05:54] deeplinks finished in 43 ms
[20:05:54] preprocess finished in 43 ms
[20:05:54] webpack started ā¦
[20:05:55] copy finished in 2.81 s
[20:06:02] webpack finished in 8.08 s
[20:06:02] sass started ā¦
[20:06:04] sass finished in 1.25 s
[20:06:04] postprocess started ā¦
[20:06:04] postprocess finished in 5 ms
[20:06:04] lint started ā¦
[20:06:04] build dev finished in 12.04 s
[11:01:01] build prod started ā¦
[11:01:01] clean started ā¦
[11:01:01] clean finished in 29 ms
[11:01:01] copy started ā¦
[11:01:01] ngc started ā¦
[WARN] Error occurred during command execution from a CLI plugin
(@ionic/cli-plugin-cordova).
TypeError: Cannot read property ācodeGenā of undefined
Tue Aug 01 11:01: $|-bash|~/Documents/Udemy/IonicAngular/RecipesMobFinished >>
What you probably want is, as Sujan has pointed out, npm run ionic:build --prod and then upload the contents of the www folder to your server. You can also uncomment the service worker in index.html and set up caching and the manifest.json file if you want.
Iāve never really tried browser builds with Cordova, but Iāve been told by someone on the Ionic team that it can be buggy, and that for now npm run ionic:build --prod is the preferred option for PWA builds.
Tue Aug 01 11:07: $|-bash|~/Documents/Udemy/IonicAngular/RecipesMobFinished >> npm run ionic:build --prod --verbose
npm info it worked if it ends with ok
npm verb cli [ ā/usr/local/bin/nodeā,
npm verb cli ā/usr/local/bin/npmā,
npm verb cli ārunā,
npm verb cli āionic:buildā,
npm verb cli āāprodā,
npm verb cli āāverboseā ]
npm info using npm@5.3.0
npm info using node@v8.2.1
npm verb run-script [ āpreionic:buildā, āionic:buildā, āpostionic:buildā ]
npm info lifecycle ionic-hello-world@~preionic:build: ionic-hello-world@
npm info lifecycle ionic-hello-world@~ionic:build: ionic-hello-world@
[11:22:13] ionic-app-scripts 2.1.3
[11:22:13] build prod started ā¦
[11:22:13] clean started ā¦
[11:22:13] clean finished in 41 ms
[11:22:13] copy started ā¦
[11:22:13] ngc started ā¦
[11:22:21] ionic-app-script task: ābuildā
[11:22:21] TypeError: Cannot read property ācodeGenā of undefined
TypeError: Cannot read property ācodeGenā of undefined
at Object.doCodegen (/Users/bendeverell/Documents/Udemy/IonicAngular/RecipesMobFinished/node_modules/@ionic/app-scripts/dist/aot/codegen.js:6:50)
at /Users/bendeverell/Documents/Udemy/IonicAngular/RecipesMobFinished/node_modules/@ionic/app-scripts/dist/aot/aot-compiler.js:42:30
at
npm verb lifecycle ionic-hello-world@~ionic:build: unsafe-perm in lifecycle true
npm verb lifecycle ionic-hello-world@~ionic:build: PATH: /usr/local/lib/node_modules/npm/bin/node-gyp-bin:/Users/bendeverell/Documents/Udemy/IonicAngular/RecipesMobFinished/node_modules/.bin:/Library/Frameworks/Python.framework/Versions/3.6/bin:~/.local/bin:/Library/Frameworks/Python.framework/Versions/3.6/bin:/opt/local/bin:/opt/local/sbin:~/.local/bin:/Users/bendeverell/mongodb/bin:/usr/local/bin:/local/sbin:/usr/local/mysql/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin
npm verb lifecycle ionic-hello-world@~ionic:build: CWD: /Users/bendeverell/Documents/Udemy/IonicAngular/RecipesMobFinished
npm info lifecycle ionic-hello-world@~ionic:build: Failed to exec ionic:build script
npm verb stack Error: ionic-hello-world@ ionic:build: ionic-app-scripts build
npm verb stack Exit status 1
npm verb stack at EventEmitter. (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:289:16)
npm verb stack at emitTwo (events.js:125:13)
npm verb stack at EventEmitter.emit (events.js:213:7)
npm verb stack at ChildProcess. (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:40:14)
npm verb stack at emitTwo (events.js:125:13)
npm verb stack at ChildProcess.emit (events.js:213:7)
npm verb stack at maybeClose (internal/child_process.js:921:16)
npm verb stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
npm verb pkgid ionic-hello-world@
npm verb cwd /Users/bendeverell/Documents/Udemy/IonicAngular/RecipesMobFinished
npm verb Darwin 16.7.0
npm verb argv ā/usr/local/bin/nodeā ā/usr/local/bin/npmā ārunā āionic:buildā āāprodā āāverboseā
npm verb node v8.2.1
npm verb npm v5.3.0
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! ionic-hello-world@ ionic:build: ionic-app-scripts build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ionic-hello-world@ ionic:build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm verb exit [ 1, true ]
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/bendeverell/.npm/_logs/2017-08-01T10_22_21_179Z-debug.log
Tue Aug 01 11:22: $|-bash|~/Documents/Udemy/IonicAngular/RecipesMobFinished >> ionic info
You have to incrementally update from version to version and make sure you do al lthe things mentioned in the changelog: https://github.com/ionic-team/ionic/blob/master/CHANGELOG.md (and probably also before, as your version is really old).
It is probably faster to create a new project with ionic start blank blank and then re-implement the functionality step by step.