Ng在卸载软件包后无法工作



你们能帮助我如何再次成功运行ng serve吗。

我参与了一个使用Bootstrap的Angular项目,然后我安装了Angular Material,我的设计被破坏了。因此,我尝试使用npm uninstall @angular/material卸载Angular Material,结果它成功卸载了。我关闭了正在运行的服务器localhost:4200,然后尝试使用ng serve再次运行该项目,但它给了我这个错误An unhandled exception occurred: ENOENT: no such file or directory, lstat 'D:desktopgithub_reposlibrary-management-systemnode_modules@angularmaterial' See "C:UsersDellAppDataLocalTempng-XYBGzpangular-errors.log" for further details.

后续问题:引导角度材料不能一起工作吗?

谢谢!

这是angular-errors.log文件中的内容:

at Object.realpathSync (fs.js:1800:7)
at resolveGlobalStyles (D:desktopgithub_reposlibrary-management-systemnode_modules@angular-devkitbuild-angularsrcwebpackconfigsstyles.js:54:31)
at Object.getStylesConfig (D:desktopgithub_reposlibrary-management-systemnode_modules@angular-devkitbuild-angularsrcwebpackconfigsstyles.js:87:70)
at D:desktopgithub_reposlibrary-management-systemnode_modules@angular-devkitbuild-angularsrcdev-serverindex.js:153:23
at generateWebpackConfig (D:desktopgithub_reposlibrary-management-systemnode_modules@angular-devkitbuild-angularsrcutilswebpack-browser-config.js:59:49)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async generateBrowserWebpackConfigFromContext (D:desktopgithub_reposlibrary-management-systemnode_modules@angular-devkitbuild-angularsrcutilswebpack-browser-config.js:116:20)
at async Object.generateI18nBrowserWebpackConfigFromContext (D:desktopgithub_reposlibrary-management-systemnode_modules@angular-devkitbuild-angularsrcutilswebpack-browser-config.js:66:20)
at async setup (D:desktopgithub_reposlibrary-management-systemnode_modules@angular-devkitbuild-angularsrcdev-serverindex.js:149:47)```

确保您的代码中没有使用任何角度材质。检查package.json是否从dependencies列表中删除了@angular/material,然后运行"npm install">

相关内容

  • 没有找到相关文章

最新更新