tslib icon indicating copy to clipboard operation
tslib copied to clipboard

Cannot find module '...node_modules/tslib/modules/index.js' imported from chunks/app/server.mjs

Open ssyberg opened this issue 2 years ago • 2 comments

This specifically started when tslib was upgraded past 2.5.1 and downgrading it back to 2.5.1 solves it. I don't understand the interplay between this package and (in my case) nuxt / nuxt/apollo to speak to anything further, hoping someone who has a better handle on this can figure it out!

Steps to reproduce:

  1. Install a fresh nuxt app
  2. Add nuxt apollo (https://apollo.nuxtjs.org/)
  3. Build and serve
  4. Navigate anywhere and you get the above error

Now if you explicitly downgrade to 2.5.1 in your package.json and follow steps 3 and 4 everything works!

ssyberg avatar Jun 12 '23 18:06 ssyberg

I lost a full day to this, hope this helps someone else who stumbles on it!

ssyberg avatar Jun 12 '23 18:06 ssyberg

resolved

export default defineNuxtConfig({ build:{ transpile: ['tslib'], }, })

georgelucasgp avatar Jul 11 '23 07:07 georgelucasgp