LoginSignup
4
1

More than 3 years have passed since last update.

@nuxt/config/index.d.ts' はモジュールではありませんの解決策

Posted at

問題点

nuxt.config.ts

import NuxtConfiguration from '@nuxt/config'

const nuxtConfig: NuxtConfiguration = {
...
}

@nuxt/config/index.d.ts' はモジュールではありませんのエラーが出る

解決策

nuxtのバージョンが原因

package.jsonでnuxtのバージョンを確認する

package.json

{
...
    "dependencies": {
        ...
        "nuxt": "^2.9.2",
        ...
    },
    ...
}


最新バージョン場合、nuxt.config.tsを以下のように修正する

nuxt.config.ts

import Configuration from '@nuxt/types'

const nuxtConfig: Configuration = {
...
}

4
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
1