无法在Component中使用带有templateURL的--prod标志。角度2,离子2

时间:2017-04-26 13:14:06

标签: angular ionic2

我有来自远程站点的tepmplateURL组件。

@Component({
  templateURL: 'http://192.168.1.100/mobilesiteapp/template/?path=pages/brands/blocks/brandpage'
})

毕竟我尝试使用--prod标志进行编译。 离子运行android --prod。但是发生错误:

ionic run android --device --prod

> MobileSiteApp@ ionic:build D:\denwerready\-readyscript\modules\mobilesiteapp\a
ppsource
> ionic-app-scripts build "--device" "--prod"

[13:14:48]  ionic-app-scripts 1.3.2
[13:14:48]  build prod started ...
[13:14:48]  clean started ...
[13:14:48]  clean finished in 1 ms
[13:14:48]  copy started ...
[13:14:48]  ngc started ...
[13:14:54]  ionic-app-script task: "build"
[13:14:54]  Error: ENOENT: no such file or directory, open
            'D:\denwerready\-readyscript\modules\mobilesiteapp\appsource\http:\1
92.168.1.100\mobilesiteapp\template\?path=app\app'
Error: ENOENT: no such file or directory, open 'D:\denwerready\-readyscript\modu
les\mobilesiteapp\appsource\http:\192.168.1.100\mobilesiteapp\template\?path=app
\app'

npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\
node_modules\\npm\\bin\\npm-cli.js" "run" "ionic:build" "--" "--device" "--prod"

npm ERR! node v7.9.0
npm ERR! npm  v4.2.0
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! MobileSiteApp@ ionic:build: `ionic-app-scripts build "--device" "--prod
"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the MobileSiteApp@ ionic:build script 'ionic-app-scripts buil
d "--device" "--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 MobileSiteApp package
,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     ionic-app-scripts build "--device" "--prod"
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs MobileSiteApp
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls MobileSiteApp
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Users\Чубзик\AppData\Roaming\npm-cache\_logs\2017-04-26T10_14_54
_556Z-debug.log

为什么呢?为什么我不能使用远程模板?

以下是我有关套餐的信息

Cordova CLI: 6.5.0
Ionic Framework Version: 3.0.1
Ionic CLI Version: 2.2.2
Ionic App Lib Version: 2.2.1
Ionic App Scripts Version: 1.3.2
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Windows 8.1
Node Version: v7.9.0
Xcode version: Not installed

0 个答案:

没有答案