ionic serve 运行一个ionic2项目,报错, 望高手解答

zj8jep 发布于 2017/03/15 16:34
阅读 3K+
收藏 0

Serverless 架构就不要服务器了?>>>

WARN: No node_modules directory found, do you need to run npm install?
npm WARN npm npm does not support Node.js v0.12.0
npm WARN npm You should probably upgrade to a newer version of node as we
npm WARN npm can't make any promises that npm will work with this version.
npm WARN npm You can find the latest version at
[..................] - : info using node@v0.12.0
[..................] / : info using node@v0.12.0

> ionic-hello-world@ ionic:serve G:\work\nodejs\kuaihuo
> ionic-app-scripts serve "--v2" "--address" "" "--port" "8100" "--livereload-port" "35729"

Caught exception:
 TypeError: undefined is not a function
    at Socket.<anonymous> (G:\work\nodejs\node_globle\node_modules\ionic\lib\utils\npmScripts.js:83:49)
    at Socket.emit (events.js:129:20)
    at readableAddChunk (_stream_readable.js:163:16)
    at Socket.Readable.push (_stream_readable.js:126:10)
    at Pipe.onread (net.js:529:20)

Mind letting us know?

'ionic-app-scripts' 不是内部或外部命令,也不是可运行的程序
npm ERR! errno 1
npm ERR! ionic-hello-world@ ionic:serve: `ionic-app-scripts serve "--v2" "--address" "" "--port" "8100" "--livereload-port" "35729"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ionic-hello-world@ ionic:serve script 'ionic-app-scripts serve "--v2" "--address" "" "--port" "8100" "--livereload-port" "35729"'.
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 ionic-hello-world package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     ionic-app-scripts serve "--v2" "--address" "" "--port" "8100" "--livereload-port" "35729"
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs ionic-hello-world
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls ionic-hello-world
npm ERR! There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?

npm ERR! A complete log of this run can be found in:
npm ERR!     G:\work\nodejs\node_cache\_logs\2017-03-15T08_33_21_738Z-debug.log
There was an error serving your Ionic application: There was an error with the spawned command: serve