typescript icon indicating copy to clipboard operation
typescript copied to clipboard

@nuxt/cli or @nuxt/cli-edge not listed as dependencies of @nuxt/typescript-runtime

Open snapwich opened this issue 3 years ago • 0 comments

Describe the bug In the @nuxt/typescript-runtime code here it references either @nuxt/cli or @nuxt/cli-edge but these are dependencies of nuxt, not @nuxt/typescript-runtime. normally this shouldn't be an issue because you'd have nuxt installed as well but with the latest npm workspaces it seems to want to hoist this package (@nuxt/typescript-runtime) but not nuxt or its dependency @nuxt/cli. this causes a module resolution error when running nuxt-ts

To Reproduce

  1. include nuxt, @nuxt/typescript-runtime, and @nuxt/typescript-build as dependencies of your sub-package in a monorepo.
  2. install dependencies at root using npm install with workspaces configured.
  3. try to run sub-package using nuxt-ts

Expected behavior nuxt-ts should run successfully. but depending on how the packages are hoisted it's possible that it won't find @nuxt/cli and @nuxt/cli-edge and crash.

snapwich avatar May 31 '22 19:05 snapwich