.net Angular 问题-未找到模块

uklbhaso  于 2022-12-14  发布在  .NET
关注(0)|答案(1)|浏览(121)

当我在dotnet项目中创建角项目,然后用命令ng serve运行它时,我得到错误。并且项目没有编译。我使用Macos Ventura。当我在另一个folder 6中创建角项目时,它工作得很好。

Error: Module not found: Error: Can't resolve '/Users/sashamaksyutenko/Documents/C#/Angular_eCommerce/skinet/client/node_modules/webpack-dev-server/client/index.js?protocol=auto%3A&username=&password=&hostname=0.0.0.0&port=0&pathname=%2Fng-cli-ws&logging=info&overlay=%7B%22errors%22%3Atrue%2C%22warnings%22%3Afalse%7D&reconnect=10&hot=false&live-reload=true' in '/Users/sashamaksyutenko/Documents/C#/Angular_eCommerce/skinet/client'

Error: Module not found: Error: Can't resolve '/Users/sashamaksyutenko/Documents/C#/Angular_eCommerce/skinet/client/src/app/app.component.scss?ngResource' in '/Users/sashamaksyutenko/Documents/C#/Angular_eCommerce/skinet/client'

Error: The loader "/Users/sashamaksyutenko/Documents/C#/Angular_eCommerce/skinet/client/src/app/app.component.scss" didn't return a string.


** Angular Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ **

✖ Failed to compile.
✔ Browser application bundle generation complete.

5 unchanged chunks

Build at: 2022-12-08T20:39:32.366Z - Hash: e287bca3ad2d74e8 - Time: 105ms

Error: Module not found: Error: Can't resolve '/Users/sashamaksyutenko/Documents/C#/Angular_eCommerce/skinet/client/node_modules/webpack-dev-server/client/index.js?protocol=auto%3A&username=&password=&hostname=0.0.0.0&port=0&pathname=%2Fng-cli-ws&logging=info&overlay=%7B%22errors%22%3Atrue%2C%22warnings%22%3Afalse%7D&reconnect=10&hot=false&live-reload=true' in '/Users/sashamaksyutenko/Documents/C#/Angular_eCommerce/skinet/client'

✖ Failed to compile.
✔ Browser application bundle generation complete.

5 unchanged chunks

Build at: 2022-12-08T20:39:32.474Z - Hash: e287bca3ad2d74e8 - Time: 79ms

Error: Module not found: Error: Can't resolve '/Users/sashamaksyutenko/Documents/C#/Angular_eCommerce/skinet/client/node_modules/webpack-dev-server/client/index.js?protocol=auto%3A&username=&password=&hostname=0.0.0.0&port=0&pathname=%2Fng-cli-ws&logging=info&overlay=%7B%22errors%22%3Atrue%2C%22warnings%22%3Afalse%7D&reconnect=10&hot=false&live-reload=true' in '/Users/sashamaksyutenko/Documents/C#/Angular_eCommerce/skinet/client'

✖ Failed to compile.

https://github.com/SashaMaksyutenko/skinet-这是我想在里面创建Angular 项目的项目

eit6fx6z

eit6fx6z1#

参考:
ASP.NET Core with Angular项目模板为使用Angular和Angular CLI实现丰富的客户端用户界面(UI)的ASP.NET Core应用程序提供了一个方便的起点。
https://learn.microsoft.com/en-us/aspnet/core/client-side/spa/angular?view=aspnetcore-7.0&tabs=visual-studio

相关问题