🖥

#Nuxt.js ERROR The "path" argument must be of type string. Received

2023/09/01に公開

i missed config ( e.g see bellow, array in array )

nuxt.config.js


export default {
  plugins: [
    ['~/plugins/foo.js']
  ]
}

$ yarn dev
yarn run v1.17.3

$ nuxt

   ╭─────────────────────────────────────────────╮
   │                                             │
   │   Nuxt.js v2.12.2                           │
   │   Running in development mode (universal)   │
   │                                             │
   │   Listening on: http://localhost:3000/      │
   │                                             │
   ╰─────────────────────────────────────────────╯

ℹ Preparing project for development                                                                                                  08:09:51
ℹ Initial build may take a while                                                                                                     08:09:51
✔ Builder initialized                                                                                                                08:09:51

 08:09:51

  at validateString (internal/validators.js:117:11)
  at Object.extname (path.js:1229:5)
  at node_modules/@nuxt/builder/dist/builder.js:5707:58
  at Array.map (<anonymous>)
  at Builder.normalizePlugins (node_modules/@nuxt/builder/dist/builder.js:5703:28)
  at async Builder.generateRoutesAndFiles (node_modules/@nuxt/builder/dist/builder.js:5665:31)
  at async Builder.build (node_modules/@nuxt/builder/dist/builder.js:5594:5)
  at async Object._buildDev (node_modules/@nuxt/cli/dist/cli-dev.js:102:5)
  at async Object.startDev (node_modules/@nuxt/cli/dist/cli-dev.js:60:7)
  at async Object.run (node_modules/@nuxt/cli/dist/cli-dev.js:47:5)
  at async NuxtCommand.run (node_modules/@nuxt/cli/dist/cli-index.js:2759:7)







image

fix it

export default {
  plugins: [
    '~/plugins/foo.js'
  ]
}

Original by Github issue

https://github.com/YumaInaura/YumaInaura/issues/3128

チャットメンバー募集

何か質問、悩み事、相談などあればLINEオープンチャットもご利用ください。

https://line.me/ti/g2/eEPltQ6Tzh3pYAZV8JXKZqc7PJ6L0rpm573dcQ

Twitter

https://twitter.com/YumaInaura

公開日時

2020-05-05

Discussion