加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

对于离子2 rc0应用,角度 – 离子服务失败

发布时间:2020-12-17 18:02:15 所属栏目:安全 来源:网络整理
导读:我刚刚创建了一个新的Ionic 2 rc0应用程序,我昨晚能够运行它. 但是,在离子服务器运行后将计算机置于睡眠状态后,在关闭离子服务器后立即尝试启动应用程序会产生此错误: Running 'serve:before' npm script before serve ionic-hello-world@ watch J:ionic p
我刚刚创建了一个新的Ionic 2 rc0应用程序,我昨晚能够运行它.

但是,在离子服务器运行后将计算机置于睡眠状态后,在关闭离子服务器后立即尝试启动应用程序会产生此错误:

Running 'serve:before' npm script before serve
> ionic-hello-world@ watch J:ionic projectsnewionicapp
> ionic-app-scripts watch
module.js:457
    throw err;
    ^

Error: Cannot find module '../dist/index'
    at Function.Module._resolveFilename (module.js:455:15)
    at Function.Module._load (module.js:403:25)
    at Module.require (module.js:483:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (J:ionic projectsnewionicappnode_modules@ionicapp-scriptsbinionic-app-scripts.js:19:3)
    at Module._compile (module.js:556:32)
    at Object.Module._extensions..js (module.js:565:10)
    at Module.load (module.js:473:32)
    at tryModuleLoad (module.js:432:12)
    at Function.Module._load (module.js:424:3)



npm
 ERR! Windows_NT 10.0.10586
npm ERR! argv "J:Program Files (x86)nodejsnode.exe" "C:UsersrosstAppDataRoamingnpmnode_modulesnpmbinnpm-cli.js" "run" "watch"
npm ERR! node v6.7.0
npm ERR! npm  v3.10.8
npm ERR! code ELIFECYCLE
npm ERR! ionic-hello-world@ watch: `ionic-app-scripts watch`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ionic-hello-world@ watch script 'ionic-app-scripts watch'.
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 watch
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 ERR! Please include the following file with any support request:
npm ERR!     J:rosstionic projectsnewionicappnpm-debug.log

Caught exception:
 undefined

Mind letting us know? https://github.com/driftyco/ionic-cli/issues

如果我创建一个新的应用程序,它运行正常.所以我认为我的项目中存在某些问题.但我不知道是什么.

解决方法

删除node_modules文件夹,然后运行npm install以重新安装所有模块.这将确保所有节点模块都是干净的.

同时删除www文件夹的内容,然后运行ionic serve重新生成文件.这将确保您的项目构建是干净的.

如果这不起作用,请尝试通过运行npm install -g ionic@2.1.0将ionic-cli更新到最新版本,然后再次尝试上述操作.

Ionic CLI使用的离子应用程序脚本版本不是特定的目标版本. Ionic-app-scripts已经更新,虽然离子cli还没有,它现在使用了更新版本的ionic-app-scripts,这给我带来了一些问题.

祝好运!

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读