我使用以下命令构建并提供我的ember应用程序:
ember build
ember serve
两者都按预期工作.
然后我转到以下localhost:4200 URL来查看应用程序并在javascript控制台中看到以下错误:
Uncaught Error: Assertion Failed: Ember Views require jQuery between 1.7 and 2.1 ember.debug.js:5921 Uncaught Error: Could not find module `ember` imported from `ui/app` loader.js:164
不确定为什么它找不到jquery或ember模块?
余烬版:
version: 2.2.0-beta.3 node: 0.12.6 npm: 2.14.10
bower.json:
{ "name": "ui", "dependencies": { "ember": "2.2.0", "ember-cli-shims": "ember-cli/ember-cli-shims#0.0.3", "ember-cli-test-loader": "0.2.1", "ember-data": "1.13.8", "ember-load-initializers": "ember-cli/ember-load-initializers#0.1.5", "ember-qunit-notifications": "0.1.0", "ember-resolver": "~0.1.18", "jquery": "^1.11.1", "loader.js": "^3.5.0", "qunit": "~1.20.0", "slick.js": "~1.4.0", "jquery-mousewheel": "~3.1.12", "videojs-youtube": "~1.2.8", "tooltipster": "~3.3.0", "OwlCarousel2": "~2.0.0-beta.3", "ember-mousetrap": "~0.2.0", "rsvp": "~3.0.18", "bootswatch": "v3.3.4+1", "ember-simple-auth": "0.7.3", "progressbar.js": "~0.8.1", "selectivity": "~1.1.0", "select2": "~4.0.0", "select2-bootstrap3-css": "~1.4.6", "jquery-mentions": "~1.0.1", "jquery-autocomplete": "~1.1.1", "jssocials": "~0.2.0", "ember-pusher": "0.1.1" }, "resolutions": { "ember-load-initializers": "0.1.5", "jquery": "^1.11.1", "loader.js": "^3.5.0", "ember-cli-test-loader": "0.2.1", "ember-data": "1.13.8", "ember-qunit-notifications": "0.1.0", "ember": "2.2.0", "select2": "~4.0.0", "qunit": "~1.20.0", "qunit-notifications": "~0.1.0" } }
的package.json:
{ "name": "ui", "version": "0.0.0", "description": "Small description for ui goes here", "private": true, "directories": { "doc": "doc", "test": "tests" }, "scripts": { "start": "ember server", "build": "ember build", "test": "ember test" }, "repository": "", "engines": { "node": ">= 0.10.0" }, "author": "", "license": "MIT", "devDependencies": { "broccoli-asset-rev": "^2.0.2", "broccoli-funnel": "^0.2.3", "broccoli-merge-trees": "^0.2.1", "ember-cli": "^2.2.0-beta.2", "ember-cli-app-version": "0.4.0", "ember-cli-babel": "^5.0.0", "ember-cli-content-security-policy": "0.4.0", "ember-cli-cookie": "^0.1.0", "ember-cli-dependency-checker": "^1.0.0", "ember-cli-deploy": "0.5.1", "ember-cli-deploy-build": "0.1.0", "ember-cli-deploy-display-revisions": "0.1.0", "ember-cli-deploy-redis": "0.1.1", "ember-cli-deploy-revision-data": "0.1.0", "ember-cli-deploy-s3": "0.2.0", "ember-cli-deploy-s3-index": "0.2.0", "ember-cli-divshot": "^0.1.7", "ember-cli-dotenv": "^1.0.3", "ember-cli-htmlbars": "0.7.9", "ember-cli-htmlbars-inline-precompile": "^0.1.1", "ember-cli-ic-ajax": "0.2.1", "ember-cli-inject-live-reload": "^1.3.0", "ember-cli-less": "^1.1.1", "ember-cli-notifications": "2.0.0", "ember-cli-pusher": "0.1.2", "ember-cli-qunit": "0.3.15", "ember-cli-release": "0.2.3", "ember-cli-simple-auth": "^0.7.3", "ember-cli-simple-auth-oauth2": "^0.7.2", "ember-cli-simple-auth-torii": "^0.8.0-beta.1", "ember-cli-tooltipster": "0.0.6", "ember-cli-uglify": "^1.0.1", "ember-data": "1.13.5", "ember-disable-proxy-controllers": "^1.0.0", "ember-export-application-global": "^1.0.2", "ember-mousetrap": "0.2.0", "ember-rapid-forms": "1.0.0-beta4", "ember-route-action-helper": "0.2.0", "ember-truth-helpers": "1.2.0", "ember-validations": "2.0.0-alpha.4", "torii": "^0.3.3" }, "dependencies": { "dotenv": "^1.2.0" } }
小智.. 15
我有同样的问题.它似乎是由于新版jquery的一个漏洞的bug.
我只是降低了我的凉亭文件中的jquery版本.
看看Lawree解决的这个问题:
通过ember-cli创建应用程序获取"未捕获错误:断言失败:Ember视图需要1.7到2.1之间的jQuery"
我有同样的问题.它似乎是由于新版jquery的一个漏洞的bug.
我只是降低了我的凉亭文件中的jquery版本.
看看Lawree解决的这个问题:
通过ember-cli创建应用程序获取"未捕获错误:断言失败:Ember视图需要1.7到2.1之间的jQuery"