试图从github创建示例项目时的离子beta错误 [英] ionic beta error when trying to create sample project from github

查看:301
本文介绍了试图从github创建示例项目时的离子beta错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用windows 10,我试图创建一个离子项目使用示例模板在github上,但我得到以下错误:

I am using windows 10 and I am trying to create an ionic project using the sample template on the github, but I am getting the following error:


D:\Programming Exercise \mobile\ionic2Samples> ionic start MyIonic2Project教程--v2 --ts
一个令人敬畏的Ionic应用程序向上...
下载: https://github.com/driftyco/ionic2-app-base/archive/typescript .zip
下载: https:// github .com / driftyco / ionic2-starter-tutorial / archive / typescript.zip
安装节点模块
无法运行exec commandError:命令失败:C:\WINDOWS\system32\ cmd.exe / s / cnpm install
npm WARN MyIonic2Project无描述
npm WARN MyIonic2Project无存储库字段。
npm WARN MyIonic2Project无许可证字段。
npm ERR! Windows_NT 10.0.10586
npm ERR! argvC:\Program Files\\\
odejs\\\
ode.exeC:\Program Files \\\
odejs\\\
ode_modules\\\
pm\bin\\\
pm-cli.jsinstall
npm ERR! node v5.6.0
npm ERR! npm v3.6.0
npm ERR!路径D:\Programming Exercise\mobile\ionic2Samples\MyIonic2Project\\\
ode_modules\json5\lib\cli.js
npm ERR!代码ENOENT
npm ERR! errno -4058
npm ERR! syscall chmod
npm ERR! enoent ENOENT:没有这样的文件或目录,chmod'D:\Programming Exercise \mobile\ionic2Samples\MyIonic2Project\\\
ode_modules\json5\lib\cli.js'
npm ERR! enoent ENOENT:没有这样的文件或目录,chmod'D:\Programming Exercise \mobile\ionic2Samples\MyIonic2Project\\\
ode_modules\json5\lib\cli.js'
npm ERR! enoent这很可能不是npm本身的问题
npm ERR! enoent并且与npm无法找到一个文件相关。
npm ERR! enoent
npm ERR!请包含任何支持请求的以下文件:
npm ERR! D:\Programming Exercise\mobile\ionic2Samples\MyIonic2Project\\\
pm-debug.log
(CLI v2.0.0-beta.17)
您的系统信息:
Cordova CLI :6.0.0
Ionic CLI版本:2.0.0-beta.17
Ionic App Lib版本:2.0.0-beta.8
操作系统:
节点版本:v5。 6.0 ***

D:\Programming Exercise\mobile\ionic2Samples>ionic start MyIonic2Project tutorial --v2 --ts One awesome Ionic app coming right up... Downloading: https://github.com/driftyco/ionic2-app-base/archive/typescript.zip Downloading: https://github.com/driftyco/ionic2-starter-tutorial/archive/typescript.zip Installing Node Modules Unable to run exec commandError: Command failed: C:\WINDOWS\system32\cmd.exe /s /c "npm install" npm WARN MyIonic2Project No description npm WARN MyIonic2Project No repository field. npm WARN MyIonic2Project No license field. npm ERR! Windows_NT 10.0.10586 npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install" npm ERR! node v5.6.0 npm ERR! npm v3.6.0 npm ERR! path D:\Programming Exercise\mobile\ionic2Samples\MyIonic2Project\node_modules\json5\lib\cli.js npm ERR! code ENOENT npm ERR! errno -4058 npm ERR! syscall chmod npm ERR! enoent ENOENT: no such file or directory, chmod 'D:\Programming Exercise\mobile\ionic2Samples\MyIonic2Project\node_modules\json5\lib\cli.js' npm ERR! enoent ENOENT: no such file or directory, chmod 'D:\Programming Exercise\mobile\ionic2Samples\MyIonic2Project\node_modules\json5\lib\cli.js' npm ERR! enoent This is most likely not a problem with npm itself npm ERR! enoent and is related to npm not being able to find a file. npm ERR! enoent npm ERR! Please include the following file with any support request: npm ERR! D:\Programming Exercise\mobile\ionic2Samples\MyIonic2Project\npm-debug.log (CLI v2.0.0-beta.17) Your system information: Cordova CLI: 6.0.0 Ionic CLI Version: 2.0.0-beta.17 Ionic App Lib Version: 2.0.0-beta.8 OS: Node Version: v5.6.0***


推荐答案

我有类似的问题:更新ionic 2后出现错误但现在解决了。

I had similar problem here: Npm error after update ionic 2 but now is solved.

您可以看到我的回答,但请尝试:

You can see my answer, but try this:


  1. 卸载ionic和cordova与: npm uninstall -g ionic cordova

  2. 使用Windows安装程序/卸载程序卸载nodejs或使用
  3. 手动移除 npm-cache
  4. strong>文件夹位于 C:\Users \ {YourUserNameHere} \AppData\Roaming\\\
    pm-cache
    (在我的情况下 npm缓存清理不起作用)
  5. 重新启动PC,现在安装 nodejs ,您可以看到现在有一​​个新版本 v5.8.0 ,并且与离子工作完美(至少对我来说)。

  6. 安装ion和cordova: npm install -g cordova ionic @ beta 并享受乐趣!

  1. Uninstall ionic and cordova with: npm uninstall -g ionic cordova
  2. Uninstall nodejs with the windows installer/uninstaller or use something like IObit Uninstaller to perform a clean and complete uninstall.
  3. Manually remove the npm-cache folder located in C:\Users\{YourUserNameHere}\AppData\Roaming\npm-cache (in my case npm cache clean doesn't work)
  4. Restart your PC and now install nodejs, you can see that now there is a new version v5.8.0 and works perfect with ionic (at least for me).
  5. Install ionic and cordova: npm install -g cordova ionic@beta and have fun!

像我在错误中看到的,您尝试了 v5.6.0 节点版本和 2.0.0-beta.17 离线版本,请立即尝试 v5.8.0 2.0.0-beta.19 ,这是目前最新版本。

Like i see in your errors, you tried v5.6.0 node version and 2.0.0-beta.17 ionic version, try now with v5.8.0 and 2.0.0-beta.19 which are the last versions at the moment.

不要忘记以管理员打开 cmd.exe 或正在使用的任何命令提示符。

P.S: Ofcourse don't forget to open the cmd.exe or whatever command prompt you are using, as Administrator.

P .S2:对不起,如果我的英语不完美,但你会明白我。

P.S2: Sorry if my english isn't perfect, but you will understand me.

这篇关于试图从github创建示例项目时的离子beta错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆