测试中的构建错误 (broccoli-persistent-filter:EslintValidationFilter)-helper.js
Build Error (broccoli-persistent-filter:EslintValidationFilter) in test-helper.js
如果有人问到这个问题,我很抱歉,但我正在努力寻找解决办法,真的需要一些帮助。自从我上次创建一个新的 ember 项目以来已经有一段时间了,但是在创建一个新项目并 运行ning 'ember serve' 我 运行 进入这个错误。 (在我的项目中没有改变任何东西)我已经尝试 uninstalling/reinstalling,更新节点和 ember.
Build Error (broccoli-persistent-filter:EslintValidationFilter) in test-helper.js
Package subpath './lib/util/traverser' is not defined by "exports" in C:\Users\John\Documents\Website Projects
slint\package.json
Stack Trace and Error Report: C:\Users\John\AppData\Local\Temp/error.dump.76ab814ea301d298cfa15b6fd73e78d2.log
我的测试-helper.js:
import Application from '../app';
import config from '../config/environment';
import { setApplication } from '@ember/test-helpers';
import { start } from 'ember-qunit';
setApplication(Application.create(config.APP));
start();
我的package.json:
{
"name": "how-to-website",
"version": "0.0.0",
"private": true,
"description": "Small description for how-to-website goes here",
"repository": "",
"license": "MIT",
"author": "",
"directories": {
"doc": "doc",
"test": "tests"
},
"scripts": {
"build": "ember build",
"lint:hbs": "ember-template-lint .",
"lint:js": "eslint .",
"start": "ember serve",
"test": "ember test"
},
"devDependencies": {
"@ember/jquery": "^0.6.0",
"@ember/optional-features": "^0.7.0",
"broccoli-asset-rev": "^3.0.0",
"ember-ajax": "^5.0.0",
"ember-cli": "^3.28.5",
"ember-cli-app-version": "^3.2.0",
"ember-cli-babel": "^7.7.3",
"ember-cli-dependency-checker": "^3.1.0",
"ember-cli-eslint": "^5.1.0",
"ember-cli-htmlbars": "^3.0.1",
"ember-cli-htmlbars-inline-precompile": "^2.1.0",
"ember-cli-inject-live-reload": "^1.8.2",
"ember-cli-sri": "^2.1.1",
"ember-cli-template-lint": "^2.0.2",
"ember-cli-uglify": "^2.1.0",
"ember-data": "~3.10.0",
"ember-export-application-global": "^2.0.0",
"ember-load-initializers": "^2.0.0",
"ember-maybe-import-regenerator": "^0.1.6",
"ember-qunit": "^4.4.1",
"ember-resolver": "^5.0.1",
"ember-source": "~3.10.0",
"ember-welcome-page": "^4.0.0",
"eslint-plugin-ember": "^6.2.0",
"eslint-plugin-node": "^9.0.1",
"loader.js": "^4.7.0",
"qunit-dom": "^0.8.4"
},
"engines": {
"node": "8.* || >= 10.*"
}
}
如果有人有任何想法,我将不胜感激。
删除 ember-cli-eslint 和 ember-cli-template-lint 应该可以修复它(并提高您的测试速度)
这 2 个包有点过时了,最好直接使用 eslint 和 template-lint
如果有人问到这个问题,我很抱歉,但我正在努力寻找解决办法,真的需要一些帮助。自从我上次创建一个新的 ember 项目以来已经有一段时间了,但是在创建一个新项目并 运行ning 'ember serve' 我 运行 进入这个错误。 (在我的项目中没有改变任何东西)我已经尝试 uninstalling/reinstalling,更新节点和 ember.
Build Error (broccoli-persistent-filter:EslintValidationFilter) in test-helper.js
Package subpath './lib/util/traverser' is not defined by "exports" in C:\Users\John\Documents\Website Projects
slint\package.json
Stack Trace and Error Report: C:\Users\John\AppData\Local\Temp/error.dump.76ab814ea301d298cfa15b6fd73e78d2.log
我的测试-helper.js:
import Application from '../app';
import config from '../config/environment';
import { setApplication } from '@ember/test-helpers';
import { start } from 'ember-qunit';
setApplication(Application.create(config.APP));
start();
我的package.json:
{
"name": "how-to-website",
"version": "0.0.0",
"private": true,
"description": "Small description for how-to-website goes here",
"repository": "",
"license": "MIT",
"author": "",
"directories": {
"doc": "doc",
"test": "tests"
},
"scripts": {
"build": "ember build",
"lint:hbs": "ember-template-lint .",
"lint:js": "eslint .",
"start": "ember serve",
"test": "ember test"
},
"devDependencies": {
"@ember/jquery": "^0.6.0",
"@ember/optional-features": "^0.7.0",
"broccoli-asset-rev": "^3.0.0",
"ember-ajax": "^5.0.0",
"ember-cli": "^3.28.5",
"ember-cli-app-version": "^3.2.0",
"ember-cli-babel": "^7.7.3",
"ember-cli-dependency-checker": "^3.1.0",
"ember-cli-eslint": "^5.1.0",
"ember-cli-htmlbars": "^3.0.1",
"ember-cli-htmlbars-inline-precompile": "^2.1.0",
"ember-cli-inject-live-reload": "^1.8.2",
"ember-cli-sri": "^2.1.1",
"ember-cli-template-lint": "^2.0.2",
"ember-cli-uglify": "^2.1.0",
"ember-data": "~3.10.0",
"ember-export-application-global": "^2.0.0",
"ember-load-initializers": "^2.0.0",
"ember-maybe-import-regenerator": "^0.1.6",
"ember-qunit": "^4.4.1",
"ember-resolver": "^5.0.1",
"ember-source": "~3.10.0",
"ember-welcome-page": "^4.0.0",
"eslint-plugin-ember": "^6.2.0",
"eslint-plugin-node": "^9.0.1",
"loader.js": "^4.7.0",
"qunit-dom": "^0.8.4"
},
"engines": {
"node": "8.* || >= 10.*"
}
}
如果有人有任何想法,我将不胜感激。
删除 ember-cli-eslint 和 ember-cli-template-lint 应该可以修复它(并提高您的测试速度)
这 2 个包有点过时了,最好直接使用 eslint 和 template-lint