打开桌面DevEco Studio--》 选择Do not import settings 因为第一次安装不需要导入之前的配置
2.4 开始创建第一个项目
点击创建项目
等待
按路径打开对应文件Index.ets
2.5 预览
这个时候预览 遇到报错了 见2.6
2.5.1 预览遇到的问题(报错)
报错内容:
1、For the system to execute the npm command under the specified directory and detect the npm version correctly, delete the prefix attribute in the .npmrc configuration file or delete the D:\Program Files\nodejs\node_modules\npm folder.
问题1:我是注释掉那个文件夹,因为不知道以前做什么安装的,暂时不删除
问题2:npm出错执行了下面的修改镜像源,然后再编译器点try again:
复制代码
npm config set registry https://registry.npmjs.org/