zoukankan      html  css  js  c++  java
  • webstorm react项目报错:Error: EPERM: operation not permitted

    webstorm上导入了react项目,执行npm run start 之后就报错,

    > cross-env APP_TYPE=site umi dev

    fs.js:114
    throw err;
    ^

    Error: EPERM: operation not permitted, open 'path ode_modules.cache@babel egister.babel.7.2.2.development.json'
    at Object.openSync (fs.js:443:3)
    at Object.writeFileSync (fs.js:1194:35)
    at save (path ode_modules@babel egisterlibcache.js:52:15)
    at process._tickCallback (internal/process/next_tick.js:61:11)
    at Function.Module.runMain (internal/modules/cjs/loader.js:832:11)
    at startup (internal/bootstrap/node.js:283:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)
    npm ERR! code ELIFECYCLE
    npm ERR! errno 1
    npm ERR! unifast-react@1.0.0 start: `cross-env APP_TYPE=site umi dev`
    npm ERR! Exit status 1
    npm ERR!
    npm ERR! Failed at the unifast-react@1.0.0 start script.
    npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

    npm ERR! A complete log of this run can be found in:
    npm ERR! D:Program Files odejs ode_cache\_logs2019-06-14T07_34_39_651Z-debug.log

    Process finished with exit code 1

    看错误信息是要写某个文件时没有权限,这时根据路径过去看下是个隐藏文件,打开看一下只有一对“{}”,

    网上能搜到的方法一般都是用管理员权限去运行“命令行”,这时候发现没用,

    然后有的提到让修改整个项目文件夹的属性,给当前用户添加修改权限,也没用,

    最后可以试下给这个.babel.7.2.2.development.json文件重命名一下,加个“_bak”后缀,然后再去webstorm中运行一下,

    此时可以正常编译运行了,

  • 相关阅读:
    内置函数二
    内置函数一
    lambda表达式
    函数参数
    set集合
    元组和字典的功能
    列表功能介绍
    分篮子
    松鼠配对?
    奇数次的数?
  • 原文地址:https://www.cnblogs.com/1394htw/p/11023629.html
Copyright © 2011-2022 走看看