在我的Ionic3示例中,我已正确执行
ionic cordova build --release android
但是
ionic cordova build android --prod --release
生成以下错误..
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
我真的被困在这里..感谢任何帮助......
npm i之后的新错误
npm WARN可选SKIPPING OPTIONAL DEPENDENCY:fsevents@^1.0.0(node_modules \ chokidar \ node_modules \ fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY:不支持的fsevents@1.1.3平台:想要{" os":" darwin"," arch":"任何& #34;}(当前:{" os":" win32"," arch":" x64"}) 错误的ERR! Windows_NT 10.0.10240 错误的ERR! argv" C:\ Program Files \ nodejs \ node.exe" " C:\ Program Files \ nodejs \ node_modules \ npm \ bin \ npm-cli.js" " I" 错误的ERR!节点v6.9.4 错误的ERR! npm v3.10.10 错误的ERR!路径C:\ Users \ JOHN \ Demo \ node_modules.staging \ tsickle-87d2a783 错误的ERR!代码EPERM 错误的ERR! errno -4048 错误的ERR!系统调用重命名
npm ERR!错误:EPERM:不允许操作,重命名' C:\ Users \ JOHN \ Demo \ node_modules.staging \ tsickle-87d2a783' - > ' C:\用户\ JOHN \演示\ node_modules \ tsickle' 错误的ERR!在destStatted(C:\ Program Files \ nodejs \ node_modules \ npm \ lib \ install \ action \ finalize.js:25:7) 错误的ERR!在C:\ Program Files \ nodejs \ node_modules \ npm \ node_modules \ graceful-fs \ polyfills.js:264:29 错误的ERR!在FSReqWrap.oncomplete(fs.js:123:15) 错误的ERR! 错误的ERR!错误:EPERM:不允许操作,重命名' C:\ Users \ JOHN \ Demo \ node_modules.staging \ tsickle-87d2a783' - > ' C:\用户\ JOHN \演示\ node_modules \ tsickle' 错误的ERR!在错误(本机) 错误的ERR! {错误:EPERM:不允许操作,重命名' C:\ Users \ JOHN \ Demo \ node_modules.staging \ tsickle-87d2a783' - > ' C:\用户\ JOHN \演示\ node_modules \ tsickle' 错误的ERR!在destStatted(C:\ Program Files \ nodejs \ node_modules \ npm \ lib \ install \ action \ finalize.js:25:7) 错误的ERR!在C:\ Program Files \ nodejs \ node_modules \ npm \ node_modules \ graceful-fs \ polyfills.js:264:29 错误的ERR!在FSReqWrap.oncomplete(fs.js:123:15) 错误的ERR! 错误的ERR!错误:EPERM:不允许操作,重命名' C:\ Users \ JOHN \ Demo \ node_modules.staging \ tsickle-87d2a783' - > ' C:\用户\ JOHN \演示\ node_modules \ tsickle' 错误的ERR!在错误(本机)父母:'演示' } 错误的ERR! 错误的ERR!请尝试以root / Administrator方式再次运行此命令。
npm ERR!请在任何支持请求中包含以下文件: 错误的ERR! C:\ Users \用户JOHN \演示\ NPM-的debug.log