microsoft / microsoft/tslib

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

Open
#209 2 comments 6 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
1.3k
Forks
145
PR merge metrics
No merged PRs in 30d

Description

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!

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue with a fresh Nuxt app, nuxt apollo, and tslib newer than 2.5.1, then build, serve, and navigate to trigger the missing modules/index.js error. Compare the result with tslib 2.5.1 and inspect the generated chunks/app/server.mjs and package resolution. Done means the app builds and serves successfully without requiring the downgrade.

Written by the indexing model from the issue text.

Assessment

Tech stack
nuxt, typescript
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.