nx icon indicating copy to clipboard operation
nx copied to clipboard

@nx/nuxt application's TS does not see shared packages (TS 2307 error)

Open Renhor opened this issue 1 year ago • 0 comments

Current Behavior

TS Error: Cannot find module '@org/my-lib' or its corresponding type declarations.ts(2307)

/apps/org/src/app.vue:

<script setup lang="ts">
import { myLib } from '@org/my-lib';
</script>

Expected Behavior

It has no errors and able to use library packages inside nuxt applications.

GitHub Repo

No response

Steps to Reproduce

Reproduction - https://github.com/Renhor/nx-nuxt-2307

Nx Report

Node   : 18.17.1
   OS     : darwin-arm64
   npm    : 9.6.7
   
   nx                 : 18.0.4
   @nx/js             : 18.0.4
   @nx/linter         : 18.0.4
   @nx/eslint         : 18.0.4
   @nx/workspace      : 18.0.4
   @nx/devkit         : 18.0.4
   @nx/eslint-plugin  : 18.0.4
   @nrwl/tao          : 18.0.4
   @nx/vite           : 18.0.4
   @nx/vue            : 18.0.4
   @nx/web            : 18.0.4
   typescript         : 5.3.3
   ---------------------------------------
   Community plugins:
   @nx/nuxt : 18.0.4

Failure Logs

No response

Package Manager Version

No response

Operating System

  • [X] macOS
  • [ ] Linux
  • [ ] Windows
  • [ ] Other (Please specify)

Additional Information

Maybe related to https://github.com/nrwl/nx/issues/21859

Renhor avatar Feb 18 '24 12:02 Renhor