我收到一个错误,说:
GET http://localhost:4200/node_modules/zone.js/dist/zone.js 404 (Not Found)
ng_zone.js:92Uncaught (in promise) Error: Angular requires Zone.js prolyfill.
at new NgZone (ng_zone.js:92)
at PlatformRef_._bootstrapModuleFactoryWithZone (application_ref.js:335)
at application_ref.js:389
NgZone @ ng_zone.js:92
PlatformRef_._bootstrapModuleFactoryWithZone @ application_ref.js:335
(anonymous) @ application_ref.js:389我在index.html文件中定义了罚款:
<!DOCTYPE html>
<html>
<head>
<title>Drew's Demo Site</title>
<base href="/">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<link rel="stylesheet" href="src/styles.css">
<script src="node_modules/core-js/client/shim.min.js"></script>
<script src="node_modules/zone.js/dist/zone.js"></script>
<script src="node_modules/reflect-metadata/Reflect.js"></script>
<!-- Polyfill(s) for older browsers -->
</head>
<body>
<my-app>Loading... </my-app>
</body>
</html>我知道发生了什么事。我的IDE在我输入时填写测试,使我认为路径是正确的,并且我反复检查,但它仍然给404。我想知道是否还有更深层次的问题。
如有任何建议,将不胜感激。
GitHib链接:备注如果您要拉动项目,则向src/添加目录资产
发布于 2017-01-20 05:49:17
已经创建了一个对您的github使用修复的拉请求。它可能不是一个正确的修复,而是一个有效的修复:)
https://github.com/drewjocham/AngularIssue/pull/1
我所做的更改基本上是将zone.js导入移动到角-cli.json文件。
https://stackoverflow.com/questions/41701091
复制相似问题