鸿蒙开发运行“Hello World“ 项目时报错:Can not find @ohos/hvigor Please check @ohos/hvigor configuration and sync

当我新创建一个项目想预览时提示报这个错:

鸿蒙开发运行“Hello World“ 项目时报错:Can not find @ohos/hvigor Please check @ohos/hvigor configuration and sync_第1张图片

把node都重装好几遍弄了很久才发现解决办法:

 1. 点开设置:

鸿蒙开发运行“Hello World“ 项目时报错:Can not find @ohos/hvigor Please check @ohos/hvigor configuration and sync_第2张图片

2. 通过搜索设置找到这一项,点击按钮

鸿蒙开发运行“Hello World“ 项目时报错:Can not find @ohos/hvigor Please check @ohos/hvigor configuration and sync_第3张图片

 3. 勾选这两项,点ok

鸿蒙开发运行“Hello World“ 项目时报错:Can not find @ohos/hvigor Please check @ohos/hvigor configuration and sync_第4张图片

4. 再点击提示框里的“run async”,再次预览我就能正常运行了

 

 鸿蒙开发运行“Hello World“ 项目时报错:Can not find @ohos/hvigor Please check @ohos/hvigor configuration and sync_第5张图片

可能造成这个提示的原因不止这一种,解决办法也不止这一种,希望能提供帮助 

你可能感兴趣的:(harmonyos)