harlan-zw / nuxt-webpack-optimisations

Make your Nuxt.js webpack builds faster ⚡
269 stars 8 forks source link

can't find This dependency `.nuxt/client.js ` #26

Closed icai closed 3 years ago

icai commented 3 years ago

Describe the bug

ERROR Failed to compile with 1 errors friendly-errors 23:29:38

This dependency was not found: friendly-errors 23:29:38 friendly-errors 23:29:38

✖ Client Compiled with some errors in 706.15ms

✖ Server Compiled with some errors in 333.29ms

To Reproduce package:

"nuxt": "^2.15.3",
"nuxt-i18n": "^6.22.1",
"nuxt-seo": "^1.5.0",
"@nuxtjs/auth": "^4.9.1",
"@nuxtjs/axios": "^5.13.1",
"@w3cub/nuxt-express-module": "^0.0.24",
 "nuxt-build-optimisations": "^1.0.2",
 "nuxt-svg-loader": "^1.2.0",

config

export default {
  // mode: 'universal',
  srcDir: 'client/',

  server: {
    // port: 3100, // default: 3000
    host: '0.0.0.0' // default: localhost
  },
  alias: {
    'assets': resolve(__dirname, './client/assets'),
    '~themes': resolve(__dirname, './client/themes')
  },
 buildModules: [
    'nuxt-build-optimisations',
    // 'nuxt-vite',
    // '~modules/svg.js',
    ['@nuxtjs/eslint-module', { fix: true }]
  ],
  buildOptimisations: {
    // profile: process.env.NODE_ENV === 'development' ? 'risky' : 'experimental'
    profile: false
  },

  /*
  ** Nuxt.js modules
  */
  modules: [
    ['nuxt-i18n'],
    // Doc: https://axios.nuxtjs.org/usage
    '@nuxtjs/axios',
    '@nuxtjs/auth',
    ['@w3cub/nuxt-express-module', { expressPath: '../server/', setupPath: '../server/app.js' }], //, routesPath: 'server/routes',
    // "@nuxtjs/svg"
    // '@nuxtjs/pwa',

  ],
}

Screenshots image

harlan-zw commented 3 years ago

Hey @icai

Thanks for the issue and sorry about the delay

I've tried to replicate this but had some issues. Are you able to provide a reproduction repo?

I will warn you though, there may be a conflict with @w3cub/nuxt-express-module which is deprecated, have you considered moving away from it?

harlan-zw commented 3 years ago

Going to close this for now, please re-open if you have a reproduction repo