我在拷贝了一份angular项目的代码后,在没有任何组件报红,也就是缺少任何组件的情况下,运行ionic serve命令,启动项目,报如下错误

"www" directory cannot be found. Please make sure the working directory is an Ionic project.

由姜晶师傅指导,刚开始发现没有node.models,在没有缺少任何组件的情况下,基本上出现这个问题就是由于angular基础环境缺少东西,所以就重新去看angular环境的搭建,过程如下,在angular环境搭建过程中,第一步是安装node.js,搜到的资料是npm在国外下载不稳定,故需要适用淘宝镜像,然后再是安装ionic的环境,因此重新在项目打开的终端运行了这三个命令,npm install             npm install cnpm -g --registry=https://registry.npm.taobao.org                     npm install -g cordova ionic

如果在项目终端npm install命令不能使用,报如下错误

"www" directory cannot be found. Please make sure the working directory is an Ionic project.

那么就是npm命令不能使,那么就要重新安装淘宝镜像,使用如下命令:npm install cnpm -g --registry=https://registry.npm.taobao.org

 

 

相关文章:

  • 2021-04-18
  • 2022-12-23
  • 2021-10-17
  • 2022-12-23
  • 2022-12-23
  • 2021-08-27
  • 2021-10-19
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-09-24
  • 2022-12-23
  • 2018-11-30
  • 2022-12-23
  • 2021-07-24
相关资源
相似解决方案