In my Ionic3 example I have properly executed

ionic cordova build --release android

But

ionic cordova build android --prod --release

generates following error..

C:\Users\JOHN\Demo>ionic cordova build android --prod --release

Running app-scripts build: --prod --platform android --target cordova

[09:20:02] build prod started ...

[09:20:03] clean started ...

[09:20:03] clean finished in 11 ms

[09:20:03] copy started ...

[09:20:03] deeplinks started ...

[09:20:03] deeplinks finished in 485 ms

[09:20:03] ngc started ...

[09:20:20] typescript error

Error encountered resolving symbol values statically. Expression

form not supported (position 97:18 in the

original .ts file), resolving symbol AppModule in

C:/Users/JOHN/Demo/src/app/app.module.ts

Error: The Angular AoT build failed. See the issues above

at C:\Users\JOHN\Demo\node_modules\@ionic\app-scripts\dist\aot\aot-

compiler.js:237:55

at step (C:\Users\JOHN\Demo\node_modules\@ionic\app-scripts\dist\aot\aot-

compiler.js:32:23)

at Object.next (C:\Users\JOHN\Demo\node_modules\@ionic\app-

scripts\dist\aot\aot-compiler.js:13:53)

at fulfilled (C:\Users\JOHN\Demo\node_modules\@ionic\app-

scripts\dist\aot\aot-compiler.js:4:58)

[09:20:20] copy finished in 17.55 s

I am really stuck here.. Any help is appreciated....

The New error after npm i

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":"win32","arch":"x64"})

npm ERR! Windows_NT 10.0.10240

npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "i"

npm ERR! node v6.9.4

npm ERR! npm v3.10.10

npm ERR! path C:\Users\JOHN\Demo\node_modules.staging\tsickle-87d2a783

npm ERR! code EPERM

npm ERR! errno -4048

npm ERR! syscall rename

npm ERR! Error: EPERM: operation not permitted, rename 'C:\Users\JOHN\Demo\node_modules.staging\tsickle-87d2a783' -> 'C:\Users\JOHN\Demo\node_modules\tsickle'

npm ERR! at destStatted (C:\Program Files\nodejs\node_modules\npm\lib\install\action\finalize.js:25:7)

npm ERR! at C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\polyfills.js:264:29

npm ERR! at FSReqWrap.oncomplete (fs.js:123:15)

npm ERR!

npm ERR! Error: EPERM: operation not permitted, rename 'C:\Users\JOHN\Demo\node_modules.staging\tsickle-87d2a783' -> 'C:\Users\JOHN\Demo\node_modules\tsickle'

npm ERR! at Error (native)

npm ERR! { Error: EPERM: operation not permitted, rename 'C:\Users\JOHN\Demo\node_modules.staging\tsickle-87d2a783' -> 'C:\Users\JOHN\Demo\node_modules\tsickle'

npm ERR! at destStatted (C:\Program Files\nodejs\node_modules\npm\lib\install\action\finalize.js:25:7)

npm ERR! at C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\polyfills.js:264:29

npm ERR! at FSReqWrap.oncomplete (fs.js:123:15)

npm ERR!

npm ERR! Error: EPERM: operation not permitted, rename 'C:\Users\JOHN\Demo\node_modules.staging\tsickle-87d2a783' -> 'C:\Users\JOHN\Demo\node_modules\tsickle'

npm ERR! at Error (native) parent: 'Demo' }

npm ERR!

npm ERR! Please try running this command again as root/Administrator.

npm ERR! Please include the following file with any support request:

npm ERR! C:\Users\JOHN\Demo\npm-debug.log

Logo

开源鸿蒙跨平台开发社区汇聚开发者与厂商,共建“一次开发,多端部署”的开源生态,致力于降低跨端开发门槛,推动万物智联创新。

更多推荐