module build failed

Rush-YL
0
Rush-YL
commented 6 months ago

Module build failed (from ./node_mdules/eslint-loader/index.js): TypeError: Cannot read property 'eslint' of undefined at Object.module.exports

0
aeksco
0
aeksco
commented 6 months ago

10/23/18 Edit: the comment below is incorrect - apologies for misleading anyone!

[email protected]~

~Remove ctx.isClient and replace with process.client in nuxt-config.js:~

extend (config, { isDev }) {
  if (isDev && process.client) {
    config.module.rules.push({
      enforce: 'pre',
      test: /\.(js|vue)$/,
      loader: 'eslint-loader',
      exclude: /(node_modules)/
    })
  }
}

Source

0
XanderLuciano
0
XanderLuciano
commented 5 months ago

@aeksco This is incorrect and process.client will be undefined.

0
NicoPennec
965
NicoPennec
commented 5 months ago

this issue is fixed by the following PR: https://github.com/nuxt-community/starter-template/pull/86

please, don't apply the @aeksco's proposal !

0
aeksco
0
aeksco
commented 5 months ago

@XanderLuciano @NicoPennec Apologies for the misleading comment - I've updated my post directing people not to follow those instructions. Thanks for posting about the fix :)

0
Informations
Question โ€ข Unresolved
#c57 - Created 6 months ago