node.jsember.jsember-cli

Build Error (broccoli-persistent-filter:EslintValidationFilter) in test-helper.js


I'm sorry if this has been asked but I'm struggling to find a fix and really could do with some help. It has been a while since I last created a fresh ember project, but after creating a new project and the running 'ember serve' I run into this error. (Not altered anything in my project) I've tried uninstalling/reinstalling, updating node and 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

My test-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();

My 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.*"
  }
}

If anyone has any ideas I would be most thankful.


Solution

  • Removing ember-cli-eslint and ember-cli-template-lint should fix it (and boost your test speed)

    Those 2 packages are kinda deprecated and it's best to use eslint and template-lint directly