简体   繁体   English

由于更新为ionic@3.19.0,因此无法构建Ionic3应用程序

[英]Can't build Ionic3 app since updating to ionic@3.19.0

I'm trying to build my ionic app with --prod flag but I'm getting issues doing it. 我正在尝试使用--prod标志构建我的离子应用程序,但是这样做遇到了问题。

After upgrading to ionic 3.18, some time ago, there was some problems and I couldn't run my app anymore. 在升级到Ionic 3.18之后,前段时间出现了一些问题,我无法再运行我的应用程序。 I forgot what were the problems but I solved them somehow with some tweakings in my package.json, if I remember well, and I was able to run the app. 我忘记了什么问题,但是如果没有记错的话,我通过在package.json中进行一些调整以某种方式解决了这些问题,并且能够运行该应用程序。
But since that, I can't get it to build with --prod flag (but it works fine without). 但是从那以后,我无法用--prod标志来构建它(但是如果没有它,它就可以正常工作)。

Today I was looking into this problem and tried deleting my node_modules and rebuilding it following this advice. 今天,我正在研究此问题,并尝试删除此node_modules并按照建议对其进行重建。 It solved the specific issue there was, but I still cannot build the app. 它解决了那里的特定问题,但我仍然无法构建该应用程序。

Here is the result of rebuilding node_modules folder running npm i : (I removed a few lines without any error in the middle, because it was too long to post otherwise.) 这是重新构建运行npm i node_modules文件夹的结果:(我删除了几行,中间没有任何错误,因为发布它太长了。)

npm WARN deprecated cordova-plugin-console@1.1.0: This plugin has been deprecated since it is now included in the latest versions of cordova-ios
npm WARN prefer global node-gyp@3.6.2 should be installed with -g
npm WARN prefer global node-ninja@1.0.2 should be installed with -g

> leveldown@1.5.0 install /path/to/my/app/node_modules/leveldown
> prebuild --install


> node-sass@4.5.3 install /path/to/my/app/node_modules/node-sass
> node scripts/install.js

Downloading binary from https://github.com/sass/node-sass/releases/download/v4.5.3/linux-x64-48_binding.node
Download complete .] - :
Binary saved to /path/to/my/app/node_modules/node-sass/vendor/linux-x64-48/binding.node
Caching binary to /home/userName/.npm/node-sass/4.5.3/linux-x64-48_binding.node

> uglifyjs-webpack-plugin@0.4.6 postinstall /path/to/my/app/node_modules/uglifyjs-webpack-plugin
> node lib/post_install.js


> node-sass@4.5.3 postinstall /path/to/my/app/node_modules/node-sass
> node scripts/build.js

Binary found at /path/to/my/app/node_modules/node-sass/vendor/linux-x64-48/binding.node
Testing binary
Binary is fine
userName@0.0.1 /path/to/my/app
├─┬ UNMET PEER DEPENDENCY @angular/common@5.0.5
│ └── tslib@1.8.0 
├── @angular/compiler@5.0.1 
├─┬ @angular/compiler-cli@5.0.1 
│ ├─┬ chokidar@1.7.0 
│ │ ├─┬ anymatch@1.3.2 
│ │ │ ├─┬ micromatch@2.3.11 
│ │ │ │ ├─┬ arr-diff@2.0.0 
│ │ │ │ │ └── arr-flatten@1.1.0 
│ │ │ │ ├── array-unique@0.2.1 
│ │ │ │ ├─┬ braces@1.8.5 
│ │ │ │ │ ├─┬ expand-range@1.8.2 
│ │ │ │ │ │ └─┬ fill-range@2.2.3 
│ │ │ │ │ │   ├── is-number@2.1.0 
│ │ │ │ │ │   ├── isobject@2.1.0 
│ │ │ │ │ │   ├─┬ randomatic@1.1.7 
│ │ │ │ │ │   │ ├─┬ is-number@3.0.0 
│ │ │ │ │ │   │ │ └── kind-of@3.2.2 
│ │ │ │ │ │   │ └── kind-of@4.0.0 
│ │ │ │ │ │   └── repeat-string@1.6.1 
│ │ │ │ │ ├── preserve@0.2.0 
│ │ │ │ │ └── repeat-element@1.1.2 
│ │ │ │ ├─┬ expand-brackets@0.1.5 
│ │ │ │ │ └── is-posix-bracket@0.1.1 
│ │ │ │ ├── extglob@0.3.2 
│ │ │ │ ├── filename-regex@2.0.1 
│ │ │ │ ├─┬ kind-of@3.2.2 
│ │ │ │ │ └── is-buffer@1.1.6 
│ │ │ │ ├─┬ object.omit@2.0.1 
│ │ │ │ │ ├─┬ for-own@0.1.5 
│ │ │ │ │ │ └── for-in@1.0.2 
│ │ │ │ │ └── is-extendable@0.1.1 
│ │ │ │ ├─┬ parse-glob@3.0.4 
│ │ │ │ │ ├── glob-base@0.3.0 
│ │ │ │ │ └── is-dotfile@1.0.3 
│ │ │ │ └─┬ regex-cache@0.4.4 
│ │ │ │   └── is-equal-shallow@0.1.3 
│ │ │ └─┬ normalize-path@2.1.1 
│ │ │   └── remove-trailing-separator@1.1.0 
│ │ ├── async-each@1.0.1 
│ │ ├── glob-parent@2.0.0 
│ │ ├─┬ is-binary-path@1.0.1 
│ │ │ └── binary-extensions@1.11.0 
│ │ ├─┬ is-glob@2.0.1 
│ │ │ └── is-extglob@1.0.0 
│ │ ├── path-is-absolute@1.0.1 
│ │ └─┬ readdirp@2.1.0 
│ │   ├─┬ readable-stream@2.3.3 
│ │   │ └── isarray@1.0.0 
│ │   └── set-immediate-shim@1.0.1 
│ ├── minimist@1.2.0 
│ ├── reflect-metadata@0.1.10 
│ ├─┬ tsickle@0.24.1 
│ │ ├─┬ mkdirp@0.5.1 
│ │ │ └── minimist@0.0.8 
│ │ ├── source-map@0.5.7 
│ │ └── source-map-support@0.4.18 
│ └── UNMET PEER DEPENDENCY typescript@2.4.2
├── UNMET PEER DEPENDENCY @angular/core@5.0.5
├── @angular/forms@5.0.1 
├── @angular/http@5.0.1 
├── @angular/platform-browser@5.0.1 
├── @angular/platform-browser-dynamic@5.0.1 
├── @ionic-native/app-availability@4.4.2 
├── @ionic-native/brightness@4.4.2 
├── @ionic-native/call-number@4.4.2 
├── @ionic-native/clipboard@4.4.2 
├── @ionic-native/contacts@4.4.2 
├── @ionic-native/core@4.4.2 
├── @ionic-native/file@4.4.2 
├── @ionic-native/in-app-browser@4.4.2 
├── @ionic-native/keyboard@4.4.2 
├── @ionic-native/sms@4.4.2 
├── @ionic-native/splash-screen@4.4.2 
├── @ionic-native/status-bar@4.4.2 
├─┬ @ionic/app-scripts@3.1.4 
│ ├─┬ @angular-devkit/build-optimizer@0.0.33 
│ │ ├─┬ loader-utils@1.1.0 
│ │ │ ├── big.js@3.2.0 
│ │ │ └── emojis-list@2.1.0 
│ │ └─┬ webpack-sources@1.1.0 
│ │   ├── source-list-map@2.0.0 
│ │   └── source-map@0.6.1 
│ ├─┬ autoprefixer@7.2.1 
│ │ ├─┬ browserslist@2.10.0 
│ │ │ └── electron-to-chromium@1.3.28 
│ │ ├── caniuse-lite@1.0.30000780 
│ │ ├── normalize-range@0.1.2 
│ │ ├── num2fraction@1.2.2 
│ │ └── postcss-value-parser@3.3.0 
│ ├─┬ chalk@2.3.0 
│ │ ├── ansi-styles@3.2.0 
│ │ ├── escape-string-regexp@1.0.5 
│ │ └─┬ supports-color@4.5.0 
│ │   └── has-flag@2.0.0 
│ ├── clean-css@4.1.9 
│ ├─┬ cross-spawn@5.1.0 
│ │ ├─┬ lru-cache@4.1.1 
│ │ │ ├── pseudomap@1.0.2 
│ │ │ └── yallist@2.1.2 
│ │ ├─┬ shebang-command@1.2.0 
│ │ │ └── shebang-regex@1.0.0 
│ │ └─┬ which@1.3.0 
│ │   └── isexe@2.0.0 
│ ├─┬ express@4.16.2 
│ │ ├─┬ accepts@1.3.4 
│ │ │ └── negotiator@0.6.1 
│ │ ├── array-flatten@1.1.1 
│ │ ├─┬ body-parser@1.18.2 
│ │ │ ├── bytes@3.0.0 
│ │ │ ├── debug@2.6.9 
│ │ │ ├─┬ http-errors@1.6.2 
│ │ │ │ ├── setprototypeof@1.0.3 
│ │ │ │ └── statuses@1.4.0 
│ │ │ ├── iconv-lite@0.4.19 
│ │ │ └── raw-body@2.3.2 
│ │ ├── content-disposition@0.5.2 
│ │ ├── content-type@1.0.4 
│ │ ├── cookie@0.3.1 
│ │ ├── cookie-signature@1.0.6 
│ │ ├─┬ debug@2.6.9 
│ │ │ └── ms@2.0.0 
│ │ ├── depd@1.1.1 
│ │ ├── encodeurl@1.0.1 
│ │ ├── escape-html@1.0.3 
│ │ ├── etag@1.8.1 
│ │ ├─┬ finalhandler@1.1.0 
│ │ │ ├── debug@2.6.9 
│ │ │ ├── statuses@1.3.1 
│ │ │ └── unpipe@1.0.0 
│ │ ├── fresh@0.5.2 
│ │ ├── merge-descriptors@1.0.1 
│ │ ├── methods@1.1.2 
│ │ ├─┬ on-finished@2.3.0 
│ │ │ └── ee-first@1.1.1 
│ │ ├── parseurl@1.3.2 
│ │ ├── path-to-regexp@0.1.7 
│ │ ├─┬ proxy-addr@2.0.2 
│ │ │ ├── forwarded@0.1.2 
│ │ │ └── ipaddr.js@1.5.2 
│ │ ├── qs@6.5.1 
│ │ ├── range-parser@1.2.0 
│ │ ├── safe-buffer@5.1.1 
│ │ ├─┬ send@0.16.1 
│ │ │ ├── debug@2.6.9 
│ │ │ ├── destroy@1.0.4 
│ │ │ ├── mime@1.4.1 
│ │ │ └── statuses@1.3.1 
│ │ ├── serve-static@1.13.1 
│ │ ├── setprototypeof@1.1.0 
│ │ ├── statuses@1.3.1 
│ │ ├─┬ type-is@1.6.15 
│ │ │ └── media-typer@0.3.0 
│ │ ├── utils-merge@1.0.1 
│ │ └── vary@1.1.2 
│ ├─┬ fs-extra@4.0.3 
│ │ ├── graceful-fs@4.1.11 
│ │ ├── jsonfile@4.0.0 
│ │ └── universalify@0.1.1 
│ ├─┬ glob@7.1.2 
│ │ ├── fs.realpath@1.0.0 
│ │ ├─┬ inflight@1.0.6 
│ │ │ └── wrappy@1.0.2 
│ │ ├─┬ minimatch@3.0.4 
│ │ │ └─┬ brace-expansion@1.1.8 
│ │ │   ├── balanced-match@1.0.0 
│ │ │   └── concat-map@0.0.1 
│ │ └── once@1.4.0 
│ ├── json-loader@0.5.7 
│ ├─┬ node-sass@4.5.3 
│ │ ├── async-foreach@0.1.3 
│ │ ├─┬ chalk@1.1.3 
│ │ │ ├── ansi-styles@2.2.1 
│ │ │ ├─┬ has-ansi@2.0.0 
│ │ │ │ └── ansi-regex@2.1.1 
│ │ │ ├─┬ strip-ansi@3.0.1 
│ │ │ │ └── ansi-regex@2.1.1 
│ │ │ └── supports-color@2.0.0 
│ │ ├── cross-spawn@3.0.1 
│ │ ├─┬ gaze@1.1.2 
│ │ │ └── globule@1.2.0 
│ │ ├── get-stdin@4.0.1 
│ │ ├── in-publish@2.0.0 
│ │ ├── lodash.assign@4.2.0 
│ │ ├── lodash.clonedeep@4.5.0 
│ │ ├── lodash.mergewith@4.6.0 
│ │ ├─┬ meow@3.7.0 
│ │ │ ├─┬ camelcase-keys@2.1.0 
│ │ │ │ └── camelcase@2.1.1 
│ │ │ ├── decamelize@1.2.0 
│ │ │ ├─┬ loud-rejection@1.6.0 
│ │ │ │ ├─┬ currently-unhandled@0.4.1 
│ │ │ │ │ └── array-find-index@1.0.2 
│ │ │ │ └── signal-exit@3.0.2 
│ │ │ ├── map-obj@1.0.1 
│ │ │ ├─┬ normalize-package-data@2.4.0 
│ │ │ │ ├── hosted-git-info@2.5.0 
│ │ │ │ ├── is-builtin-module@1.0.0 
│ │ │ │ └─┬ validate-npm-package-license@3.0.1 
│ │ │ │   ├─┬ spdx-correct@1.0.2 
│ │ │ │   │ └── spdx-license-ids@1.2.2 
│ │ │ │   └── spdx-expression-parse@1.0.4 
│ │ │ ├─┬ read-pkg-up@1.0.1 
│ │ │ │ ├─┬ find-up@1.1.2 
│ │ │ │ │ ├── path-exists@2.1.0 
│ │ │ │ │ └─┬ pinkie-promise@2.0.1 
│ │ │ │ │   └── pinkie@2.0.4 
│ │ │ │ └─┬ read-pkg@1.1.0 
│ │ │ │   ├─┬ load-json-file@1.1.0 
│ │ │ │   │ ├─┬ parse-json@2.2.0 
│ │ │ │   │ │ └─┬ error-ex@1.3.1 
│ │ │ │   │ │   └── is-arrayish@0.2.1 
│ │ │ │   │ ├── pify@2.3.0 
│ │ │ │   │ └─┬ strip-bom@2.0.0 
│ │ │ │   │   └── is-utf8@0.2.1 
│ │ │ │   └── path-type@1.1.0 
│ │ │ ├─┬ redent@1.0.0 
│ │ │ │ ├─┬ indent-string@2.1.0 
│ │ │ │ │ └─┬ repeating@2.0.1 
│ │ │ │ │   └── is-finite@1.0.2 
│ │ │ │ └── strip-indent@1.0.1 
│ │ │ └── trim-newlines@1.0.0 
│ │ ├── nan@2.4.0 
│ │ ├─┬ node-gyp@3.6.2 
│ │ │ ├── fstream@1.0.11 
│ │ │ ├─┬ nopt@3.0.6 
│ │ │ │ └── abbrev@1.1.1 
│ │ │ ├─┬ npmlog@2.0.4 
│ │ │ │ ├── ansi@0.3.1 
│ │ │ │ └─┬ gauge@1.2.7 
│ │ │ │   ├── lodash.pad@4.5.1 
│ │ │ │   ├── lodash.padend@4.6.1 
│ │ │ │   └── lodash.padstart@4.6.1 
│ │ │ ├─┬ osenv@0.1.4 
│ │ │ │ └── os-tmpdir@1.0.2 
│ │ │ ├── semver@5.3.0 
│ │ │ └─┬ tar@2.2.1 
│ │ │   └── block-stream@0.0.9 
│ │ ├─┬ npmlog@4.1.2 
│ │ │ ├─┬ are-we-there-yet@1.1.4 
│ │ │ │ └── delegates@1.0.0 
│ │ │ ├── console-control-strings@1.1.0 
│ │ │ ├─┬ gauge@2.7.4 
│ │ │ │ ├── aproba@1.2.0 
│ │ │ │ ├── has-unicode@2.0.1 
│ │ │ │ ├─┬ string-width@1.0.2 
│ │ │ │ │ ├── code-point-at@1.1.0 
│ │ │ │ │ └─┬ is-fullwidth-code-point@1.0.0 
│ │ │ │ │   └── number-is-nan@1.0.1 
│ │ │ │ └─┬ wide-align@1.1.2 
│ │ │ │   └─┬ string-width@1.0.2 
│ │ │ │     ├── is-fullwidth-code-point@1.0.0 
│ │ │ │     └─┬ strip-ansi@3.0.1 
│ │ │ │       └── ansi-regex@2.1.1 
│ │ │ └── set-blocking@2.0.0 
│ │ ├─┬ sass-graph@2.2.4 
│ │ │ ├─┬ scss-tokenizer@0.2.3 
│ │ │ │ ├── js-base64@2.4.0 
│ │ │ │ └─┬ source-map@0.4.4 
│ │ │ │   └── amdefine@1.0.1 
│ │ │ └─┬ yargs@7.1.0 
│ │ │   ├── camelcase@3.0.0 
│ │ │   ├── os-locale@1.4.0 
│ │ │   ├─┬ string-width@1.0.2 
│ │ │   │ ├── is-fullwidth-code-point@1.0.0 
│ │ │   │ └─┬ strip-ansi@3.0.1 
│ │ │   │   └── ansi-regex@2.1.1 
│ │ │   ├── which-module@1.0.0 
│ │ │   └─┬ yargs-parser@5.0.0 
│ │ │     └── camelcase@3.0.0 
│ │ └── stdout-stream@1.4.0 
│ ├─┬ os-name@2.0.1 
│ │ ├── macos-release@1.1.0 
│ │ └── win-release@1.1.1 
│ ├─┬ postcss@6.0.14 
│ │ └── source-map@0.6.1 
│ ├── proxy-middleware@0.15.0 
│ ├── rollup@0.50.0 
│ ├─┬ rollup-plugin-commonjs@8.2.6 
│ │ ├── acorn@5.2.1 
│ │ ├── estree-walker@0.5.1 
│ │ ├─┬ magic-string@0.22.4 
│ │ │ └── vlq@0.2.3 
│ │ ├─┬ resolve@1.5.0 
│ │ │ └── path-parse@1.0.5 
│ │ └─┬ rollup-pluginutils@2.0.1 
│ │   └── estree-walker@0.3.1 
│ ├─┬ rollup-plugin-node-resolve@3.0.0 
│ │ ├─┬ browser-resolve@1.11.2 
│ │ │ └── resolve@1.1.7 
│ │ ├── builtin-modules@1.1.1 
│ │ └── is-module@1.0.0 
│ ├── source-map@0.6.1 
│ ├─┬ tiny-lr@1.0.5 
│ │ ├─┬ body@5.1.0 
│ │ │ ├── continuable-cache@0.3.1 
│ │ │ ├─┬ error@7.0.2 
│ │ │ │ └── string-template@0.2.1 
│ │ │ ├─┬ raw-body@1.1.7 
│ │ │ │ ├── bytes@1.0.0 
│ │ │ │ └── string_decoder@0.10.31 
│ │ │ └── safe-json-parse@1.0.1 
│ │ ├── debug@2.6.9 
│ │ ├─┬ faye-websocket@0.10.0 
│ │ │ └─┬ websocket-driver@0.7.0 
│ │ │   ├── http-parser-js@0.4.9 
│ │ │   └── websocket-extensions@0.1.3 
│ │ ├── livereload-js@2.2.2 
│ │ └── object-assign@4.1.1 
│ ├─┬ tslint@5.8.0 
│ │ ├─┬ babel-code-frame@6.26.0 
│ │ │ ├─┬ chalk@1.1.3 
│ │ │ │ ├── ansi-styles@2.2.1 
│ │ │ │ ├─┬ strip-ansi@3.0.1 
│ │ │ │ │ └── ansi-regex@2.1.1 
│ │ │ │ └── supports-color@2.0.0 
│ │ │ ├── esutils@2.0.2 
│ │ │ └── js-tokens@3.0.2 
│ │ ├── commander@2.12.2 
│ │ ├── diff@3.4.0 
│ │ └── tsutils@2.13.0 
│ ├─┬ tslint-eslint-rules@4.1.1 
│ │ ├─┬ doctrine@0.7.2 
│ │ │ ├── esutils@1.1.6 
│ │ │ └── isarray@0.0.1 
│ │ └── tsutils@1.9.1 
│ ├─┬ uglify-es@3.2.1 
│ │ └── source-map@0.6.1 
│ ├─┬ webpack@3.8.1 
│ │ ├── acorn@5.2.1 
│ │ ├─┬ acorn-dynamic-import@2.0.2 
│ │ │ └── acorn@4.0.13 
│ │ ├─┬ UNMET PEER DEPENDENCY ajv@5.5.1
│ │ │ ├── co@4.6.0 
│ │ │ ├── fast-deep-equal@1.0.0 
│ │ │ ├── fast-json-stable-stringify@2.0.0 
│ │ │ └── json-schema-traverse@0.3.1 
│ │ ├── ajv-keywords@2.1.1 
│ │ ├── async@2.6.0 
│ │ ├── enhanced-resolve@3.4.1 
│ │ ├─┬ escope@3.6.0 
│ │ │ ├─┬ es6-map@0.1.5 
│ │ │ │ ├── d@1.0.0 
│ │ │ │ ├── es5-ext@0.10.37 
│ │ │ │ ├── es6-iterator@2.0.3 
│ │ │ │ ├── es6-set@0.1.5 
│ │ │ │ ├── es6-symbol@3.1.1 
│ │ │ │ └── event-emitter@0.3.5 
│ │ │ ├── es6-weak-map@2.0.2 
│ │ │ ├── esrecurse@4.2.0 
│ │ │ └── estraverse@4.2.0 

├─┬ rxjs@5.5.2 
│ └── symbol-observable@1.1.0 
├─┬ sugar@2.0.4 
│ └── sugar-core@2.0.4 
├─┬ sw-toolbox@3.6.0 
│ ├─┬ path-to-regexp@1.7.0 
│ │ └── isarray@0.0.1 
│ └── serviceworker-cache-polyfill@4.0.0 
├── UNMET PEER DEPENDENCY typescript@2.6.1
├── underscore@1.8.3 
└── zone.js@0.8.18 

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN ionic2-auto-complete@1.5.3-beta requires a peer of @angular/core@^4.0.0 but none was installed.
npm WARN @angular/platform-browser-dynamic@5.0.1 requires a peer of @angular/core@5.0.1 but none was installed.
npm WARN @angular/platform-browser-dynamic@5.0.1 requires a peer of @angular/common@5.0.1 but none was installed.
npm WARN @angular/compiler-cli@5.0.1 requires a peer of typescript@>=2.4.2 <2.5 but none was installed.
npm WARN @angular/http@5.0.1 requires a peer of @angular/core@5.0.1 but none was installed.
npm WARN @angular/platform-browser@5.0.1 requires a peer of @angular/core@5.0.1 but none was installed.
npm WARN @angular/platform-browser@5.0.1 requires a peer of @angular/common@5.0.1 but none was installed.
npm WARN @angular/forms@5.0.1 requires a peer of @angular/core@5.0.1 but none was installed.
npm WARN @angular/forms@5.0.1 requires a peer of @angular/common@5.0.1 but none was installed.
npm WARN tsickle@0.24.1 requires a peer of typescript@2.4.2 but none was installed.
npm WARN ajv-keywords@2.1.1 requires a peer of ajv@^5.0.0 but none was installed.

There are quite a few error messages in this. 有很多错误信息。
Any idea which are relevant and how to correct them? 有什么相关的想法以及如何纠正它们?

Also, this is the content of my package.json file, in case that's useful: 另外,如果有用的话,这也是我的package.json文件的内容:

{
    "name": "appName",
    "version": "versionNumber",
    "author": "Ionic Framework",
    "homepage": "http://ionicframework.com/",
    "private": true,
    "scripts": {
        "clean": "ionic-app-scripts clean",
        "build": "ionic-app-scripts build",
        "lint": "ionic-app-scripts lint",
        "ionic:build": "ionic-app-scripts build",
        "ionic:serve": "ionic-app-scripts serve"
    },
    "dependencies": {
        "@angular/common": "^5.0.1",
        "@angular/compiler": "5.0.1",
        "@angular/compiler-cli": "5.0.1",
        "@angular/core": "^5.0.1",
        "@angular/forms": "5.0.1",
        "@angular/http": "5.0.1",
        "@angular/platform-browser": "5.0.1",
        "@angular/platform-browser-dynamic": "5.0.1",
        "@ionic-native/app-availability": "^4.4.2",
        "@ionic-native/brightness": "^4.2.1",
        "@ionic-native/call-number": "^4.4.2",
        "@ionic-native/clipboard": "^4.4.2",
        "@ionic-native/contacts": "^4.2.1",
        "@ionic-native/core": "^4.4.2",
        "@ionic-native/file": "^4.2.1",
        "@ionic-native/in-app-browser": "^4.4.2",
        "@ionic-native/keyboard": "^4.2.1",
        "@ionic-native/sms": "^4.4.2",
        "@ionic-native/splash-screen": "4.4.2",
        "@ionic-native/status-bar": "4.4.2",
        "@ionic/storage": "2.1.3",
        "@types/jquery": "^3.2.12",
        "angular-elastic": "^2.5.1",
        "angular2-elastic": "^0.13.0",
        "call-number": "^1.0.1",
        "color": "^2.0.1",
        "cordova-android": "^6.2.3",
        "cordova-clipboard": "^1.1.0",
        "cordova-plugin-appavailability": "^0.4.2",
        "cordova-plugin-brightness": "^0.1.5",
        "cordova-plugin-compat": "^1.1.0",
        "cordova-plugin-console": "^1.0.5",
        "cordova-plugin-contacts": "^3.0.0",
        "cordova-plugin-device": "^1.1.4",
        "cordova-plugin-file": "^5.0.0",
        "cordova-plugin-inappbrowser": "^1.7.2",
        "cordova-plugin-splashscreen": "^4.0.3",
        "cordova-plugin-statusbar": "^2.2.2",
        "cordova-plugin-whitelist": "^1.3.1",
        "cordova-sms-plugin": "^0.1.11",
        "ionic": "^3.17.0",
        "ionic-angular": "^3.9.2",
        "ionic-plugin-keyboard": "^2.2.1",
        "ionic2-auto-complete": "^1.5.3-beta",
        "ionicons": "3.0.0",
        "jquery": "^3.2.1",
        "moment": "^2.18.1",
        "mx.ferreyra.callnumber": "~0.0.2",
        "ng-tags-input": "^3.2.0",
        "pouchdb": "^6.3.4",
        "pouchdb-find": "^6.3.4",
        "rxjs": "5.5.2",
        "sugar": "^2.0.4",
        "sw-toolbox": "3.6.0",
        "underscore": "^1.8.3",
        "zone.js": "0.8.18"
    },
    "devDependencies": {
        "@ionic/app-scripts": "^3.1.2",
        "@types/pouchdb": "^6.3.0",
        "@types/pouchdb-find": "^6.3.0",
        "ionic": "3.19.0",
        "typescript": "2.6.1"
    },
    "description": "An Ionic project",
    "cordova": {
        "plugins": {
            "cordova-plugin-console": {},
            "cordova-plugin-device": {},
            "cordova-plugin-splashscreen": {},
            "cordova-plugin-statusbar": {},
            "cordova-plugin-whitelist": {},
            "ionic-plugin-keyboard": {},
            "cordova-plugin-file": {},
            "cordova-plugin-contacts": {},
            "cordova-plugin-brightness": {},
            "mx.ferreyra.callnumber": {},
            "cordova-clipboard": {},
            "cordova-sms-plugin": {},
            "cordova-plugin-inappbrowser": {},
            "cordova-plugin-appavailability": {}
        },
        "platforms": [
            "android"
        ]
    }
}

And this is the error I get when I try building the app: 这是我尝试构建应用程序时遇到的错误:

$ ionic cordova build android --prod
Running app-scripts build: --prod --platform android --target cordova
[18:55:39]  build prod started ... 
[18:55:39]  clean started ... 
[18:55:39]  clean finished in 1 ms 
[18:55:39]  copy started ... 
[18:55:40]  deeplinks started ... 
[18:55:40]  deeplinks finished in 327 ms 
[18:55:40]  ngc started ... 
[18:55:50]  typescript error 
            ("mplate [ngTemplateOutlet]="template || defaultTemplate" [ERROR ->][ngOutletContext]=" {attrs:{ data: 
            suggestion, keyword: keyword, labelAttribu") 

[18:55:50]  typescript error 
            ("gestion of suggestions" (tap)="select(suggestion);$event.srcEvent.stopPropagation()"> [ERROR 
            ->]<ng-template [ngTemplateOutlet]="template || defaultTemplate" ") 

Error: The Angular AoT build failed. See the issues above
    at /path/to/my/app/node_modules/@ionic/app-scripts/dist/aot/aot-compiler.js:237:55
    at step (/path/to/my/app/node_modules/@ionic/app-scripts/dist/aot/aot-compiler.js:32:23)
    at Object.next (/path/to/my/app/node_modules/@ionic/app-scripts/dist/aot/aot-compiler.js:13:53)
    at fulfilled (/path/to/my/app/node_modules/@ionic/app-scripts/dist/aot/aot-compiler.js:4:58)
[18:55:50]  copy finished in 10.71 s 

Most of them were warnings. 其中大多数是警告。 So you don't need to worry about those things. 因此,您无需担心那些事情。

You have done a number of things which were against the Ionic 3.9.2 . 您已经做了很多违反Ionic 3.9.2 You must never use the latest angular since the Ionic team has not tested it yet. 您切勿使用最新的angular因为Ionic团队尚未对其进行测试。 eg You used angular ^5.0.1 . 例如,您使用angular ^5.0.1 You need to follow this official package.json file.And also don't use ^ with angular versions. 您需要遵循这个官方的package.json文件,也不要在有angular版本中使用^

Your typescript version too very higher one. 您的typescript版本太高了。 You need to follow this: 您需要遵循以下步骤:

"devDependencies": {
    "@ionic/app-scripts": "3.1.4",
    "typescript": "~2.4.2"
  },

Use "@ionic/app-scripts": "3.1.4" 使用“ @ ionic / app-scripts”:“ 3.1.4”

After doing all the above changes delete node_modules folder and run npm i 完成上述所有更改后, 删除 node_modules文件夹并运行npm i

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM