简体   繁体   English

复制和粘贴后,Angular CLI项目无法正常工作

[英]Angular CLI project not working after copying and pasting

I'm new to Angular and over the past few days I've been creating a new project using it. 我是Angular的新手,在过去的几天里,我一直在使用它来创建一个新项目。 I've used the Angular CLI to create the project and it's been running fine. 我已经使用Angular CLI创建了项目,并且运行良好。 I've added no additional dependencies or done anything special. 我没有添加任何其他依赖项,也没有做任何特殊的事情。

I want to upload my project to GIT, so I copied and pasted the contents of the project folder into another directory. 我想将项目上传到GIT,所以我将项目文件夹的内容复制并粘贴到另一个目录中。 Now when I attempt to run the project it doesn't work - I get the error: 现在,当我尝试运行项目时,它不起作用-我收到错误消息:

Cannot get /

The project still works in its previous location. 该项目仍可在其先前位置工作。 I've tried deleting node_modules and doing an npm install but still have the same problem. 我曾尝试删除node_modules并进行npm安装,但仍然存在相同的问题。

I don't know what additional information to provide as I've not been using Angular long. 我不知道要使用什么其他信息,因为我一直没有使用Angular。

The comments here by jonrsharpe helped lead me to an answer. jonrsharpe在这里的评论帮助我找到了答案。 The problem isn't with the project itself (as such) but rather the folder/repository itself. 问题不在于项目本身(本身),而在于文件夹/存储库本身。 Angular will throw the "Cannot get /" error when in a folding containing "%20" in it's name. 在名称中包含“%20”的折叠中,Angular将引发“无法获取/”错误。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM