nuxt: Nuxt 2.7.0 raises ERROR The "path" argument must be of type string. Received type undefined
Off-topic
I cannot access https://bug.nuxtjs.org/ It does not work for me at all.
That’s why I post it as-is.
On topic
I try to upgrade to the latest Nuxt, I use https://github.com/wemake-services/wemake-vue-template
» npm run dev
> timeless_is@0.0.0 dev /Users/sobolev/Documents/github/timeless_is
> cross-env NODE_ENV=development nuxt
╭─────────────────────────────────────────────╮
│ │
│ Nuxt.js v2.7.0 │
│ Running in development mode (universal) │
│ TypeScript support is enabled │
│ │
│ Listening on: http://localhost:3000/ │
│ │
╰─────────────────────────────────────────────╯
ℹ Preparing project for development 17:45:15
ℹ Initial build may take a while 17:45:15
✔ Builder initialized 17:45:15
ERROR The "path" argument must be of type string. Received type undefined
at validateString (internal/validators.js:125:11)
at Object.extname (path.js:1365:5)
at uniqBy_1.options.plugins.map (node_modules/@nuxt/builder/dist/builder.js:5684:58)
at Array.map (<anonymous>)
at Builder.normalizePlugins (node_modules/@nuxt/builder/dist/builder.js:5680:28)
at Builder.generateRoutesAndFiles (node_modules/@nuxt/builder/dist/builder.js:5653:36)
at Builder.build (node_modules/@nuxt/builder/dist/builder.js:5574:16)
No ideas where to look.
<div align="right">This question is available on Nuxt community (#c9212)</div>About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 16 (8 by maintainers)
Resolved! Turned out there was a cache from something. Uninstalled all packages, locks,
.nuxt/folder.Clean build is working. Thanks for the serverside logs! Awesome feature.
Also had this issue, but in my case, the problem was that I was missing an environment variable in my .env file that was added during dev process and I just didn’t know that it was. So, after I added it everything returned to normal.
@sobolevn ok. thanks for the clarification. closing it for now. please tell us it happened again 😃
also /cc @kevinmarrec
@pi0 sure!
And:
@sobolevn Dunno how it became
undefinedin your case though 😁@pi0 @sobolevn It’s internal validators of
pathand it isn’t related to TypeScript :So if we follow the trace back and look for nuxt builder code
It means
p.srcis undefined, so it either mean :or
Issue is reproducible with such statements in
nuxt.config.js.