nuxt / typescript

TypeScript Support for Nuxt 2
https://typescript.nuxtjs.org
MIT License
569 stars 124 forks source link

Cannot read properties of undefined (reading 'options') #561

Closed Rain-Hsiang closed 1 year ago

Rain-Hsiang commented 1 year ago

Describe the bug Cannot read properties of undefined (reading 'options')!

To Reproduce 1. get nuxt3 demo

npx nuxi init <project-name>
yarn

2. add @nuxt/typescript-build

yarn add --dev @nuxt/typescript-build @nuxt/types

nuxt.config.ts

export default defineNuxtConfig({
  modules: ['@nuxt/typescript-build'],
});

tsconfig.json

{
  // https://nuxt.com/docs/guide/concepts/typescript
  "extends": "./.nuxt/tsconfig.json",
  "compilerOptions": {
    "target": "ES2018",
    "module": "ESNext",
    "moduleResolution": "Node",
    "lib": ["ESNext", "ESNext.AsyncIterable", "DOM"],
    "esModuleInterop": true,
    "allowJs": true,
    "sourceMap": true,
    "strict": true,
    "noEmit": true,
    "baseUrl": ".",
    "paths": {
      "~/*": ["./*"],
      "@/*": ["./*"]
    },
    "types": ["@types/node", "@nuxt/types"]
  },
  "exclude": ["node_modules"]
}

Expected behavior no error

Screenshots

截屏2023-02-28 13 23 09

Additional context Add any other context about the problem here.

danielroe commented 1 year ago

This module is not compatible (or needed) with Nuxt 3. Nuxt 3 has TypeScript support built in.

Rain-Hsiang commented 1 year ago

This module is not compatible (or needed) with Nuxt 3. Nuxt 3 has TypeScript support built in.

thanks