ionic serve报错

ace0206 2017-04-02 05:15:41
D:\ionic2\amate>ionic serve -all

> amate-project@ ionic:serve D:\ionic2\amate
> ionic-app-scripts serve "--a" "--v2" "--lab" "--address" "0.0.0.0" "--port" "8101" "--livereload-port" "35730"

[17:03:37] ionic-app-scripts 1.1.4
[17:03:37] watch started ...
[17:03:37] build dev started ...
[17:03:37] clean started ...
[17:03:37] clean finished in 1 ms
[17:03:37] copy started ...
[17:03:37] transpile started ...
[17:03:39] transpile finished in 2.16 s
[17:03:39] preprocess started ...
[17:03:39] preprocess finished in 1 ms
[17:03:39] webpack started ...
[17:03:40] copy finished in 2.27 s
crypto.js:74
this._handle.update(data, encoding);
^

TypeError: Data must be a string or a buffer
at Hash.update (crypto.js:74:16)
at HarmonyExportImportedSpecifierDependency.updateHash (D:\ionic2\amate\node_modules\webpack\lib\dependencies\HarmonyExportImportedSpecifierDependency.js:144:8)
at D:\ionic2\amate\node_modules\webpack\lib\DependenciesBlock.js:33:5
at Array.forEach (native)
at NormalModule.DependenciesBlock.updateHash (D:\ionic2\amate\node_modules\webpack\lib\DependenciesBlock.js:32:20)
at NormalModule.Module.updateHash (D:\ionic2\amate\node_modules\webpack\lib\Module.js:162:41)
at NormalModule.updateHash (D:\ionic2\amate\node_modules\webpack\lib\NormalModule.js:327:30)
at modules.forEach.m (D:\ionic2\amate\node_modules\webpack\lib\Chunk.js:253:31)
at Array.forEach (native)
at Chunk.updateHash (D:\ionic2\amate\node_modules\webpack\lib\Chunk.js:253:16)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! amate-project@ ionic:serve: `ionic-app-scripts serve "--a" "--v2" "--lab" "--address" "0.0.0.0" "--port" "8101" "--livereload-port" "35730"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the amate-project@ ionic:serve script 'ionic-app-scripts serve "--a" "--v2" "--lab" "--address" "0.0.0.0" "--port" "8101" "--livereload-port" "35730"'.
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 amate-project package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! ionic-app-scripts serve "--a" "--v2" "--lab" "--address" "0.0.0.0" "--port" "8101" "--livereload-port" "35730"
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs amate-project
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls amate-project
npm ERR! There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Administrator\AppData\Roaming\npm-cache\_logs\2017-04-02T09_03_42_467Z-debug.log
There was an error serving your Ionic application: There was an error with the spawned command: serve
...全文
841 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
ace0206 2017-04-02
  • 打赏
  • 举报
回复
使用最新的ionic2、angular2、typescript技术,在Visual Studio Code下进行移动开发,npm的各种命令安装都很顺利,也能编译出android版本,在chroma中调试也很爽,然而,,,某次重新开始ionic serve的时候,悲剧就发生了,错误如上,我也知道是代码某处的类型出问题了,但这个该死的提示就是不说出具体文件,找遍了网上的所有类似问题,还是没有确切的解决方案,这玩艺,难道就不能有个正常的准确一点编译提示吗?哪怕具体到某个文件也行啊,非要搞得这么模糊朦胧让人摸不着头吗? 其实我只想知道如何调试、正常编译而已,还是我不知道正确方式,请大侠们指点一二!

790

社区成员

发帖
与我相关
我的任务
社区描述
移动平台 其他移动相关
社区管理员
  • 移动开发其他问题社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧