javascript - Ember 构建错误

标签 javascript json ember.js routes

当运行ember build --environment=product时,一切似乎都编译得很好。将文件放入服务器上的 dist/ 中也可以正常进行,但是当我单击页面上的链接时,出现以下错误:

      vendor-ef159bc….js:11 Error while processing route: account Unexpected token < in JSON at position 0 SyntaxError: Unexpected token < in JSON at position 0
at Object.parse (native)
at ae.parseJSON (http://localhost:8000/assets/vendor-ef159bc608efff575c24c5e13c2d1218.js:3:12644)
at W (http://localhost:8000/assets/vendor-ef159bc608efff575c24c5e13c2d1218.js:1:15665)
at n (http://localhost:8000/assets/vendor-ef159bc608efff575c24c5e13c2d1218.js:3:13996)
at XMLHttpRequest.<anonymous> (http://localhost:8000/assets/vendor-ef159bc608efff575c24c5e13c2d1218.js:3:20168)`.

我做错了什么?

最佳答案

我最近解决了类似的问题,方法是在 Bower.json 中从 jQuery 2 降级到 jQuery 1,然后删除 Bower_components 中的 jQuery 文件夹,然后运行 ​​bower install 命令。

关于javascript - Ember 构建错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37349856/

相关文章:

javascript - node.js/jQuery跨域: ERR_CONNECTION_REFUSED

javascript - Paper.js pathData 动画 onFrame 和 onMouseDrag

php - Dhtmlx Scheduler 未在 TimeInterval 中更新

Ember.js RESTAdapter 属性类型

ember.js - 尝试注册未知工厂: `controller:application`

ember.js - 多个 ember js 应用程序?

javascript - 解释嵌套的 javascript 对象属性访问器字符串的最快方法是什么?

javascript - 按钮单击在 Greasemonkey/Tampermonkey 脚本中不起作用。已经使用 waitForKeyElements() 尝试了标准鼠标事件

android - 将 JSONArray 转换为字符串数组

python - 检查给定值是否在嵌套字典中