This repository was archived by the owner on May 1, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 312
This repository was archived by the owner on May 1, 2020. It is now read-only.
ionic build android --prod fail #833
Copy link
Copy link
Closed
Description
Note: for support questions, please use one of these channels:
https://forum.ionicframework.com/
http://ionicworldwide.herokuapp.com/
Short description of the problem:
i start a new ionic 2 project,when use ionic build android --prod it failed ngc,and if i use ionic build android it success,it completely a new project,i didn't change any code,i don't know why.
What behavior are you expecting?
how can i build --prod success
i tried npm with 4.4.1 it also failed .logs same as below.
Steps to reproduce:
1.
2.
3.
insert any relevant code between the above and below backticks
```D:\addapp>ionic build android --prod
> ionic-app-base@ ionic:build D:\addapp
> ionic-app-scripts build "--prod"
[14:45:33] ionic-app-scripts 1.1.4
[14:45:33] build prod started ...
[14:45:33] clean started ...
[14:45:33] clean finished in less than 1 ms
[14:45:33] copy started ...
[14:45:33] ngc started ...
[14:45:43] build prod failed: Error encountered resolving symbol values statica
lly. Calling function 'makeDecorator',
function calls are not supported. Consider replacing the function or
lambda with a reference to an exported
function, resolving symbol Injectable in
D:/addapp/node_modules/ionic-angular/node_modules/@angular/core/src/
di/metadata.d.ts, resolving symbol
OpaqueToken in D:/addapp/node_modules/ionic-angular/node_modules/@an
gular/core/src/di/opaque_token.d.ts,
resolving symbol OpaqueToken in
D:/addapp/node_modules/ionic-angular/node_modules/@angular/core/src/
di/opaque_token.d.ts
[14:45:43] ionic-app-script task: "build"
[14:45:43] Error: Error encountered resolving symbol values statically. Calling
function 'makeDecorator', function
calls are not supported. Consider replacing the function or lambda w
ith a reference to an exported function,
resolving symbol Injectable in
D:/addapp/node_modules/ionic-angular/node_modules/@angular/core/src/
di/metadata.d.ts, resolving symbol
OpaqueToken in D:/addapp/node_modules/ionic-angular/node_modules/@an
gular/core/src/di/opaque_token.d.ts,
resolving symbol OpaqueToken in
D:/addapp/node_modules/ionic-angular/node_modules/@angular/core/src/
di/opaque_token.d.ts
Error: Error encountered resolving symbol values statically. Calling function 'm
akeDecorator', function calls are not supported. Consider replacing the function
or lambda with a reference to an exported function, resolving symbol Injectable
in D:/addapp/node_modules/ionic-angular/node_modules/@angular/core/src/di/metad
ata.d.ts, resolving symbol OpaqueToken in D:/addapp/node_modules/ionic-angular/n
ode_modules/@angular/core/src/di/opaque_token.d.ts, resolving symbol OpaqueToken
in D:/addapp/node_modules/ionic-angular/node_modules/@angular/core/src/di/opaqu
e_token.d.ts
at SyntaxError.BaseError [as constructor] (D:\addapp\node_modules\.2.4.8@@an
gular\compiler\bundles\compiler.umd.js:1597:31)
at new SyntaxError (D:\addapp\node_modules\.2.4.8@@angular\compiler\bundles\
compiler.umd.js:1795:20)
at simplifyInContext (D:\addapp\node_modules\.2.4.8@@angular\compiler\bundle
s\compiler.umd.js:25783:27)
at StaticReflector.simplify (D:\addapp\node_modules\.2.4.8@@angular\compiler
\bundles\compiler.umd.js:25795:17)
at StaticReflector.annotations (D:\addapp\node_modules\.2.4.8@@angular\compi
ler\bundles\compiler.umd.js:25291:64)
at NgModuleResolver.resolve (D:\addapp\node_modules\.2.4.8@@angular\compiler
\bundles\compiler.umd.js:17771:86)
at CompileMetadataResolver.getNgModuleMetadata (D:\addapp\node_modules\.2.4.
8@@angular\compiler\bundles\compiler.umd.js:18272:64)
at addNgModule (D:\addapp\node_modules\.2.4.8@@angular\compiler\bundles\comp
iler.umd.js:25053:62)
at D:\addapp\node_modules\.2.4.8@@angular\compiler\bundles\compiler.umd.js:2
5064:18
at Array.forEach (native)
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\
node_modules\\npm\\bin\\npm-cli.js" "run" "ionic:build" "--" "--prod"
npm ERR! node v6.9.1
npm ERR! npm v3.10.8
npm ERR! code ELIFECYCLE
npm ERR! ionic-app-base@ ionic:build: `ionic-app-scripts build "--prod"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ionic-app-base@ ionic:build script 'ionic-app-scripts bui
ld "--prod"'.
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-app-base packag
e,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! ionic-app-scripts build "--prod"
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs ionic-app-base
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls ionic-app-base
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! D:\addapp\npm-debug.log
**Which @ionic/app-scripts version are you using?**
**Other information:** (e.g. stacktraces, related issues, suggestions how to fix, stackoverflow links, forum links, etc)
ordova CLI: 6.5.0
Ionic Framework Version: 2.3.0
Ionic CLI Version: 2.2.1
Ionic App Lib Version: 2.2.0
Ionic App Scripts Version: 1.1.4
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Windows 7
Node Version: v6.9.1
Xcode version: Not installed
Metadata
Metadata
Assignees
Labels
No labels