【发布时间】:2017-05-07 14:04:53
【问题描述】:
大家好,我正在尝试为我正在学习的这个 Angular 2 课程运行一个 html 文件。在为应用程序创建依赖项后,我使用 npm 下载了它们。现在,当我尝试运行该应用程序时,出现此错误..
file:///Users/Rocky/Angular2-course/skeleton/node_modules/jquery/dist/jquery.min.js 加载资源失败:net::ERR_FILE_NOT_FOUND
这就是我编写 jquery 脚本的方式..
<script src="node_modules/jquery/dist/jquery.min.js"></script>
<script src="node_modules/tether/dist/js/tether.min.js"></script>
<script src="node_modules/bootstrap/dist/js/bootstrap.min.js"></script>
【问题讨论】:
-
你能告诉我们文件所在的完整路径吗?看起来是路径问题。同时告诉我们您的 HTML 文件的位置
-
或者文件没有权限?
-
抱歉,我如何向您显示文件所在的路径? @RajshekarReddy
-
加载资源失败:net::ERR_FILE_NOT_FOUND 表示你的jQuery文件路径错误。回来看看。
-
如果 jquery 没有在我的 node_modules 中退出,我该怎么办。它应该在我安装 NPM 包时下载。 @DucFilan
标签: javascript jquery angularjs node.js