【客开学习】react安装

fengzhenhai@fengzhenhaideMacBook-Pro ~ % npm install -g cnpm --registry=https://registry.npmmirror.com

npm ERR! code EACCES

npm ERR! syscall mkdir

npm ERR! path /usr/local/lib/node_modules/cnpm

npm ERR! errno -13

npm ERR! Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/cnpm'

npm ERR!  [Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/cnpm'] {

npm ERR!   errno: -13,

npm ERR!   code: 'EACCES',

npm ERR!   syscall: 'mkdir',

npm ERR!   path: '/usr/local/lib/node_modules/cnpm'

npm ERR! }

在npm install 命令前添加sudo搞定。

去掉npm config set 前的sudo搞定。

安装create-react-app插件,在cnpm install前添加sudo

在指定目录创建my-app

进入my-app执行npm start

参考资料:https://www.runoob.com/react/react-install.html

相关推荐

  1. react mac 安装

    2023-12-27 09:18:03       51 阅读
  2. Recat学习

    2023-12-27 09:18:03       31 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2023-12-27 09:18:03       94 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2023-12-27 09:18:03       100 阅读
  3. 在Django里面运行非项目文件

    2023-12-27 09:18:03       82 阅读
  4. Python语言-面向对象

    2023-12-27 09:18:03       91 阅读

热门阅读

  1. 自动化 使用Python+pandas在数据库取值

    2023-12-27 09:18:03       46 阅读
  2. Spring AOP 中定义切入点 @target 与 @within 的区别

    2023-12-27 09:18:03       56 阅读
  3. PostgreSql 并行

    2023-12-27 09:18:03       72 阅读
  4. SpringCloud跨服务调用失败Seata无法回滚解决办法

    2023-12-27 09:18:03       49 阅读
  5. 【常用前端框架总结】

    2023-12-27 09:18:03       53 阅读
  6. 产业互联网,并不存在所谓的平台和中心

    2023-12-27 09:18:03       62 阅读
  7. AutoSAR(基础入门篇)3.1-Autosar中RTE的概述

    2023-12-27 09:18:03       52 阅读
  8. Pillow库画图用法记录python

    2023-12-27 09:18:03       53 阅读