问题描述:

前一次创建利用命令行创建ionic项目一次性成功,第二次没有运行:

$ npm install -g ionic cordova

直接运行:

ionic start ionicDemo

出现上图错误:

× Running command - failed!
Exception: npm ERR! path C:\work\ionicdemo\node_modules\fsevents\node_modules
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall scandir
npm ERR! Error: EPERM: operation not permitted, scandir 'C:\work\ionicdemo\node_modules\fsevents\node_modules'
npm ERR! at Error (native)
npm ERR! { Error: EPERM: operation not permitted, scandir 'C:\work\ionicdemo\node_modules\fsevents\node_modules'
npm ERR! at Error (native)
npm ERR! stack: 'Error: EPERM: operation not permitted, scandir \'C:\\work\\ionicdemo\\node_modules\\fsevents\\node_modules\'\n at Error (native)',
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'scandir',
npm ERR! path: 'C:\\work\\ionicdemo\\node_modules\\fsevents\\node_modules' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\admin\AppData\Roaming\npm-cache\_logs\2017-08-12T13_57_00_472Z-debug.log

解决办法:

几经折腾使用下面方法即可:

1.移除node_modules文件,然后清除npm缓存,再将npm升级,继而重新安装。(github 上面能够solve那些issue的基本都是执行这些操作的,大多都是因为版本问题出现的错误)
# rm -rf node_modules
# npm clean cache

删除:/用户路径/AppData/Roaming/npm/node_modules

例如我的路径是:C:\Users\admin\AppData\Roaming\npm\node_modules

2.重新安装ionic CLI Cordova

# npm install -g ionic cordova

再次执行:

#ionic start ionicdemo

创建成功,OK。

 
 

ionic start 创建ionic项目报错,及解决过程的更多相关文章

  1. Eclipse创建Maven项目报错的解决

    报错1:Could not resolve archetype org.apache.maven.archetypes:maven-archetype-quickstart 起因:删除一个用quick ...

  2. 【待解决】maven创建web项目报错

    创建web项目时报错

  3. AndroidStudio创建新项目报错

    创建新项目自动执行时报错: Failed to import new Gradle project: failed to find Build Tools revision 17.0.0 Consul ...

  4. 创建Java项目报错处理

    好久没用Eclipse编写Java程序了,今天创建一个Java项目的时候,老报错,错误信息如下: Implicit super constructor Object() is undefined fo ...

  5. idea创建maven项目报错,Error initializing: org.codehaus.plexus.velocity.DefaultVelocityComponent@56da52a7 java.lang.NoClassDefFoundError: org/apache/commons/lang/StringUtils

    学着使用idea,想创建个maven项目,但是出师不利,立马报错,贼尴尬,错误信息如下: D:\Develop\JDK\bin\java.exe -Dmaven.multiModuleProjectD ...

  6. maven命令行创建web项目报错:java.lang.NoClassDefFoundError: org/apache/commons/lang/StringUtils

    早上一上班就想新建一个web项目玩玩,没想到一敲命令创建就失败了,真是出师不利.各种折腾无果,当然我也可以用eclipse直接创建的,就是不甘心被这破问题给耍了.刚刚才发现问题原因,这个结果我也是醉了 ...

  7. 创建MAVEN项目报错

    创建MAVEN项目pom.xml报错 Failure to transfer org.apache.maven:maven-archiver:jar:2.4.2 from http://repo.ma ...

  8. Eclipse maven创建web项目报错Could not resolve archetype

    1.下载http://repo1.maven.org/maven2/archetype-catalog.xml 通过eclipse下载和网页下载我这里都比较慢,最后用的迅雷下载 2.将本地xml文件配 ...

  9. Eclipse导入MyEclipse创建的web项目报错的解决方法

    将myeclipse中开发的动态web项目直接引入到eclipse中继续开发,Eclipse中会报项目有错,如下图

  10. Eclipse 创建maven项目 报错 one or more constraints have not been satisfied

    首先 在 pom.xml > plugins 中添加 <plugin> <groupId>org.apache.maven.plugins</groupId> ...

随机推荐

  1. HighCharts之2D对数饼图

    HighCharts之2D对数饼图 1.实例源码 LogarithmicPie.html: <!DOCTYPE html> <html> <head> <me ...

  2. NetBeans部署项目(Extjs)报错(二)

    NetBeans部署项目(Extjs)报错(二) 1.具体错误如下: Using CATALINA_BASE: "C:\Users\Administrator.FOXB2MKB3RGUNIL ...

  3. java.sql.SQLException之数组越界

    java.sql.SQLException之数组越界 1.具体错误如下: (1)java.sql.SQLException:Parameter index out of range(0<1) ( ...

  4. freemarker写select组件(五)

    freemarker写select组件 1.宏定义 <#macro select id datas value="" key="" text=" ...

  5. windows驱动之WDF---CharSample

    驱动程序部分: NTSTATUS DriverEntry( IN PDRIVER_OBJECT DriverObject, IN PUNICODE_STRING RegistryPath ) /*++ ...

  6. Linux之批量挂载硬盘

    ############parted工具分区############### #!/bin/bash #shell脚本开头格式PATH=/bin:/sbin:/usr/bin:/usr/sbin #保证 ...

  7. 【转载】Apache Spark Jobs 性能调优(一)

    当你开始编写 Apache Spark 代码或者浏览公开的 API 的时候,你会遇到各种各样术语,比如 transformation,action,RDD 等等. 了解到这些是编写 Spark 代码的 ...

  8. THUWC2018咸鱼记

    Day -inf 好不容易联赛水进来了 好虚啊...(萌新)什么都不会...只会大水题 估计要\(GG\)了,瑟瑟发抖 准备辣.. 自我介绍根本没面试,就没脸贴了 周围的大佬们(尤其\(Zsy\))还 ...

  9. iBrand 教程 0.1:Windows + Homestead 5 搭建 Laravel 开发环境

    统一开发环境 为了保证在学习和工作过程中避免因为开发环境不一致而导致各种各样的问题,Laravel 官方为了我们提供了一个完美的开发环境 Laravel Homestead,让我们无需再本地安装 PH ...

  10. Nginx 配置对流量、连接和请求的限制

    首先给出配置段: http { limit_conn_zone $binary_remote_addr zone=one:10m; limit_req_zone $binary_remote_addr ...