search

Home  >  Q&A  >  body text

node.js - 运行npm出错

之前在nodejs文件夹下的node_modules下新建了文件夹a,新建的时候就提示不允许,可是还是新建成功了,现在运行npm出现Error: EPERM: operation not permitted, mkdir 'C:Program Filesnodejsnode_modulesa',我把a文件删了还是这么提醒,怎么办?

阿神阿神2873 days ago539

reply all(3)I'll reply

  • 阿神

    阿神2017-04-17 15:28:18

    Why do you want to create a new folder under node_modules?
    Delete the entire node_modules and try npm install again

    reply
    0
  • 大家讲道理

    大家讲道理2017-04-17 15:28:18

    This prompt is related to permissions.

    Try executing cmd with administrator rights and then run npm.

    reply
    0
  • ringa_lee

    ringa_lee2017-04-17 15:28:18

    In fact, when you install node, you are outside the installation directory. There is also a cache directory for modules. and other files in your C drive. . So you need to clear them all when deleting. . Then installing and running npm will be no problem. .

    reply
    0
  • Cancelreply