error after running v0.15
-
Hi I need help with the newest version when I command quasar dev and i encountered this error.
X:\some\directories\client\src\pages\404.vue 1:1 error Definition for rule 'import/named' was not found import/named 1:1 error Definition for rule 'import/namespace' was not found import/namespace 1:1 error Definition for rule 'import/default' was not found import/default 1:1 error Definition for rule 'import/export' was not found import/export
can anyone help me its my first time using this new version thank you!
-
Make sure you have node version 8 +
Also what options did you choose during project init for linting? Should maybe try the defaults
-
hi, @benoitranque thanks for the response. here is what I choose during the project init:
? Pick an ESLint preset none ? Cordova id (disregard if not building mobile apps) org.cordova.shopsellah.app ? Use Vuex? (recommended for complex apps/websites) Yes ? Use Axios for Ajax calls? Yes ? Use Vue-i18n? (recommended if you support multiple languages) Yes ? Support IE11? Yes ? Should we run `npm install` for you after the project has been created? (recommended) NPM
my node version is 8.9.x
-
@jeimz173 These are errors raised by ESlint. While you chose not to take any ESLint preset, the ESlint plugin
eslint-plugin-import
has not been installed. -
So the solution is …
-
Well, at the end the solution was to install
eslint-plugin-import
, but also all the dependencies eslint-standard has and the standard plugin itself:
npm install --save-dev eslint-config-standard eslint-plugin-standard eslint-plugin-promise eslint-plugin-import eslint-plugin-node
Then on the eslint config you have to add standard to the list of extends
extends: ['plugin:vue/essential','standard'],
To be honest, it is a bit confusing that answering no to an optional question totally breaks your startup experience. I spent almost one hour on this.
Regards
-
Hi all, I ended up reinstalling new project :)… anyway thank you Ill take this to my note for reference.
-
To be honest, it is a bit confusing that answering no to an optional question totally breaks your startup experience. I spent almost one hour on this.
@danielo515 If you answered no to “Use ESLint to lint your code?” and the build had issues, it’s legit to complaign and It probably requires a new ticket on
quasar-cli
repository.
But It seems @jeimz173 answerednone
only toPick an ESLint preset
. Then, It looks legit for application build to break while application uses es6+ rules and ESLint needs definition for them. -
Hello @Akaryatrh, I have picked eslint as an option for linting, and I picked none as preset, which I think is exactly the same as @jeimz173 did. Why I did such thing ? Because I didn’t liked any of the provided presets and I wanted to install one myself. In that situation is not legit to break the application. I don’t know how quasar-cli works internally, but if the user answers that he wants to use eslint, then all required dependencies should be installed. Allowing the user to shoot himself on the foot is never a good option.
I think my use case is legit, and should be supported too.Regards
-
@danielo515 i have same issue and installing this plugins don’t help
-
I had the same problem and fixed it by installing the eslint-plugin-import plugin (if you you installed ESlint globally you need to install it globally too) and configuring ESlint like recommended in the readme of the repo here https://github.com/benmosher/eslint-plugin-import
You need to add “import” in plugins in your .eslintrc.js (at the root of your project folder), like this:
plugins: [
‘import’
]and in the extends option like this:
extends: [“plugin:import/errors”, “plugin:import/warnings”]
After that the errors messages will be gone.