角度 - [错误] 错误:找不到模块 '../data/prefixes'



我的Angular-13应用程序运行良好。但突然间,当我今天早上想运行ng-serve-o时,我得到了这个错误:

[error] Error: Cannot find module '../data/prefixes'
Require stack:
- C:UsersHPDesktopMyAppnode_modulesautoprefixerlibautoprefixer.js
- C:UsersHPDesktopMyAppnode_modulespostcss-preset-envindex.js
- C:UsersHPDesktopMyAppnode_modules@angular-devkitbuild-angularsrcwebpackconfigsstyles.js
- C:UsersHPDesktopMyAppnode_modules@angular-devkitbuild-angularsrcwebpackconfigsindex.js
- C:UsersHPDesktopMyAppnode_modules@angular-devkitbuild-angularsrcbuildersdev-serverindex.js
- C:UsersHPDesktopMyAppnode_modules@angular-devkitarchitectnodenode-modules-architect-host.js
- C:UsersHPDesktopMyAppnode_modules@angular-devkitarchitectnodeindex.js
- C:UsersHPDesktopMyAppnode_modules@angularclimodelsarchitect-command.js
- C:UsersHPDesktopMyAppnode_modules@angularclicommandsserve-impl.js
- C:UsersHPDesktopMyAppnode_modules@angular-devkitschematicstoolsexport-ref.js
- C:UsersHPDesktopMyAppnode_modules@angular-devkitschematicstoolsindex.js
- C:UsersHPDesktopMyAppnode_modules@angularcliutilitiesjson-schema.js
- C:UsersHPDesktopMyAppnode_modules@angularclimodelscommand-runner.js
- C:UsersHPDesktopMyAppnode_modules@angularclilibcliindex.js
- C:UsersHPAppDataRoamingnpmnode_modules@angularclilibinit.js
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
at Function.Module._load (node:internal/modules/cjs/loader:778:27)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.<anonymous> (C:UsersHPDesktopMyAppnode_modulesautoprefixerlibautoprefixer.js:15:12)
at Module._compile (node:internal/modules/cjs/loader:1101:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:1005:19)

我检查了打字脚本和代码,但无法追踪错误。

注释:没有指定纠正错误的实际程序(Angular CLI runing ng serve(的标记

如何解决此问题?

感谢

正如我所说,它确实向我显示了跟踪错误的任何信息。我手动删除了node_modules文件夹。然后通过运行npm-Install来安装npm。所以,一切都变好了。感谢

相关内容

最新更新