問題点
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 = {
...
}