当我运行离子服务时,它会构建应用程序,但服务器不会运行。这是小道:
Starting app-scripts server: --address 0.0.0.0 --port 8100 --livereload-port 35729
--dev-logger-port 53703 --nobrowser - Ctrl+C to cancel
[17:55:35] watch started ...
[17:55:35] build dev started ...
[17:55:36] clean started ...
[17:55:36] clean finished in 2 ms
[17:55:36] copy started ...
[17:55:36] deeplinks started ...
[17:55:37] deeplinks finished in 589 ms
[17:55:37] transpile started ...
[17:55:44] transpile finished in 7.38 s
[17:55:44] preprocess started ...
[17:55:44] copy finished in 8.56 s
[17:55:44] preprocess finished in 206 ms
[17:55:44] webpack started ...
webpack启动后,cli退出,我看到正常的终端提示符。
尝试使用npm run ionic:serve命令会导致此错误:
TypeError: Cannot read property 'substr' of undefined
到目前为止,我已经重新安装了离子,同样的结果。有点不确定如何处理这个...
答案 0 :(得分:0)
事实证明,这是在一个ts文件中创建多个组件类时引起的。将这些类拆分成自己的文件可以解决问题。
与此https://github.com/ionic-team/ionic-app-scripts/issues/796
相关