-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rule can only have one resource source #8277
Comments
Same issue here, although the fix mentioned above about removing eslint doesn't seem to fix the issue for me. |
I've noticed that other dependencies are causing the same issue, like sass-loader, maybe more annoying than eslint :/ |
FYI, I redid the same layout of my previous project (essentially following https://nuxtjs.org/blog/creating-blog-with-nuxt-content/#installation), but with yarn instead of npm, and did NOT run into the same issue. Maybe that would help the maintainers narrow down the issue? |
same here, also because of the sass-loader |
same issue. It would be webpack 5.x. webpack 4.x lastest is working. |
got it too |
Same error. |
Problem is compatibility with nodejs 15, downgrade to 14 and my problem solved. |
didn't help for me |
Me either. my node version is 14.x already. |
can you check npm version, it seems problem with npm v7. |
my npm version 7.0.7. can u say me, which version fix that problem? |
Try to install version 6, also delete node_modules folder and package-lock.json file, then run |
that solved my problem. thx |
Same issue here. Solved installing Node LTS 14.15 instead of Current 15.2 |
You don't need to downgrade npm... just use the |
I'm using npm version 6.14.8 and it's not working... |
@cheap-glitch - I'm not familiar with --legacy-peer-deps. Can you explain how it is used or point to some documentation on it? |
Per @cheap-glitch's suggestion, I deleted my node_modules folder and package-lock.json file and ran
|
@cssagogo AFAIK it was introduced in a v7 beta a few months ago: https://blog.npmjs.org/post/626173315965468672/npm-v7-series-beta-release-and-semver-major |
Thanks for your contribution to Nuxt!
Issues that are labeled as |
Remove stale. |
Thanks for your contribution to Nuxt!
Issues that are labeled as |
This issue is certainly not resolved. I get this every time I create a new project:
import colors from 'vuetify/es5/util/colors'
export default {
// Global page headers: https://go.nuxtjs.dev/config-head
head: {
titleTemplate: '%s - records',
title: 'records',
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
{ hid: 'description', name: 'description', content: '' },
],
link: [{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }],
},
// Global CSS: https://go.nuxtjs.dev/config-css
css: [],
// Plugins to run before rendering page: https://go.nuxtjs.dev/config-plugins
plugins: [],
// Auto import components: https://go.nuxtjs.dev/config-components
components: true,
// Modules for dev and build (recommended): https://go.nuxtjs.dev/config-modules
buildModules: [
// https://go.nuxtjs.dev/eslint
'@nuxtjs/eslint-module',
// https://go.nuxtjs.dev/vuetify
'@nuxtjs/vuetify',
],
// Modules: https://go.nuxtjs.dev/config-modules
modules: [
// https://go.nuxtjs.dev/axios
'@nuxtjs/axios',
// https://go.nuxtjs.dev/pwa
'@nuxtjs/pwa',
],
// Axios module configuration: https://go.nuxtjs.dev/config-axios
axios: {},
// PWA module configuration: https://go.nuxtjs.dev/pwa
pwa: {
manifest: {
lang: 'en',
},
},
// Vuetify module configuration: https://go.nuxtjs.dev/config-vuetify
vuetify: {
customVariables: ['~/assets/variables.scss'],
theme: {
dark: true,
themes: {
dark: {
primary: colors.blue.darken2,
accent: colors.grey.darken3,
secondary: colors.amber.darken3,
info: colors.teal.lighten1,
warning: colors.amber.base,
error: colors.deepOrange.accent4,
success: colors.green.accent3,
},
},
},
},
// Build Configuration: https://go.nuxtjs.dev/config-build
build: {},
}
{
"name": "records",
"version": "1.0.0",
"private": true,
"scripts": {
"dev": "nuxt",
"build": "nuxt build",
"start": "nuxt start",
"generate": "nuxt generate",
"lint:js": "eslint --ext \".js,.vue\" --ignore-path .gitignore .",
"lint": "npm run lint:js",
"test": "jest"
},
"dependencies": {
"@nuxtjs/axios": "^5.12.5",
"@nuxtjs/pwa": "^3.3.4",
"core-js": "^3.8.2",
"nuxt": "^2.14.12"
},
"devDependencies": {
"@nuxtjs/eslint-config": "^5.0.0",
"@nuxtjs/eslint-module": "^3.0.2",
"@nuxtjs/vuetify": "^1.11.3",
"@vue/test-utils": "^1.1.2",
"babel-core": "7.0.0-bridge.0",
"babel-eslint": "^10.1.0",
"babel-jest": "^26.6.3",
"eslint": "^7.18.0",
"eslint-config-prettier": "^7.1.0",
"eslint-plugin-nuxt": "^2.0.0",
"eslint-plugin-prettier": "^3.3.1",
"eslint-plugin-vue": "^7.4.1",
"jest": "^26.6.3",
"prettier": "^2.2.1",
"vue-jest": "^3.0.4"
}
} |
Seeing the same error as others. Don't know if it is related, but it seems there is a dependency to an old version of core-js somewhere. It does seem the error is gone using nuxt 2.15 though #8591 From package-lock.json: "node_modules/@nuxt/babel-preset-app": { |
Same issue here today so it doesn't seem to be resolved, i got exactly the same error as @AndersNielsen85 had. Node version: v14.15.0 Edit: Fixed it by switching back to |
Removing
|
I'm closing this as I can't reproduce using the original installation steps above, and there are indications it is no longer occurring in Nuxt 2.15+ |
After much trial and error, I think I've found the issue. It's Webpack v5.x! If you are using Node v15.x and you run
Then Webpack v5.x is installed. I switched to Node LTS (14.16.0) and re-created the application, now the application runs. Looking into Here is a related Vue issue; vuejs/vue-cli#5986 |
@tsega I'm glad you've sorted it out! Newer versions of Nuxt should also help by printing out a warning if Webpack 5 is detected. |
You can fix it by pinning webpack: |
Having the same problem in a fresh install. |
This solve my problem |
having same problem with fresh install and solved with changing webpack version. |
Update: Its 24th August 2021 and this issue came up once I installed sass-loader with v2.15.8, I have tried the solutions discussed above to no avail. Thanks |
@Adamskoullos can you share your |
Hi thanks for responding. Sorry I have not got the previous I was using this command to add sass and loader which was causing the above error. This was installing version 12: Once I used the command within the Nuxt docs I had no issues, which installed version 10: For further context, I was adding the The above works nicely now. |
Downgrade stylus-loader for webpack 4, and rebuild the dependency to fix npm dev issues. See nuxt/nuxt#8277
Downgrade stylus-loader for webpack 4, and rebuild the dependency to fix npm dev issues. See nuxt/nuxt#8277
@vout thank you, it works for me after changing/installing node-sass |
Downgrading ts-loader, webpack and webpack-cli solved the issue for me. Thanks for tips 👍🏼
|
For those still encountering this issue, here's what I had as a "problematic dependencies":
Therefore I solved it by:
Node v14.21 |
Maybe related to @nuxtjs/eslint-module
Versions
Reproduction
Create a fresh app with following parameters, and try to
npm run dev
Some warnings may help to understood the issue :
What is Expected?
It should run and be available through localhost:3000
What is actually happening?
Build fail with the following error :
Workaround
Issue seems to be located in npm dependencies resolution, If I remove @nuxtjs/eslint-module in dependencies, remove package-lock and rerun
npm install
, it's solving the issue.The text was updated successfully, but these errors were encountered: