What I'm doing & what's wrong
I'm working on a new project (GitHub repo) and when I'm trying to run a local dev server I'm getting this error:
> jakub-suchenek@1.1.0 dev
> nuxt
╭───────────────────────────────────────╮
│ │
│ Nuxt @ v2.15.7 │
│ │
│ ▸ Environment: development │
│ ▸ Rendering: server-side │
│ ▸ Target: server │
│ │
│ Listening: http://localhost:3000/ │
│ │
╰───────────────────────────────────────╯
i Preparing project for development 19:29:23
i Initial build may take a while 19:29:23
i Discovered Components: .nuxt/components/readme.md 19:29:23
√ Builder initialized 19:29:23
ERROR The "path" argument must be of type string. Received undefined 19:29:23
at new NodeError (node:internal/errors:371:5)
at validateString (node:internal/validators:119:11)
at Object.extname (node:path:837:5)
at node_modules\@nuxt\builder\dist\builder.js:413:98
at Array.map (<anonymous>)
at Builder.normalizePlugins (node_modules\@nuxt\builder\dist\builder.js:409:28)
at async Builder.generateRoutesAndFiles (node_modules\@nuxt\builder\dist\builder.js:371:31)
at async Builder.build (node_modules\@nuxt\builder\dist\builder.js:319:5)
at async Object._buildDev (node_modules\@nuxt\cli\dist\cli-dev.js:107:5)
at async Object.startDev (node_modules\@nuxt\cli\dist\cli-dev.js:65:7)
at async Object.run (node_modules\@nuxt\cli\dist\cli-dev.js:52:5)
at async NuxtCommand.run (node_modules\@nuxt\cli\dist\cli-index.js:413:7)
But this occurs only when I have this in my nuxt.config.js file:
plugins: [ "@babel/plugin-proposal-private-property-in-object", { "loose": true }],
Without this plugin config, I have A LOT of spam in the console.
plugins: [],
A few hundred times:
WARN Though the "loose" option was set to "false" in your @babel/preset-env config, it will not be used for @babel/plugin-proposal-private-property-in-object since the "loose" mode option was set to "true" for @babel/plugin-proposal-private-methods.
The "loose" option must be the same for @babel/plugin-proposal-class-properties, @babel/plugin-proposal-private-methods and @babel/plugin-proposal-private-property-in-object (when they are enabled): you can silence this warning by explicitly adding
["@babel/plugin-proposal-private-property-in-object", { "loose": true }]
to the "plugins" section of your Babel config.
What I've tried
- Changing Nuxt.js version (
2.15,2.14,2.13). - Reinstalling node packages.
My question
What is the best solution for this? To do not have console spam with "WARN" and have a working app.
Or is there no solution? According to this post, for now there's no way to do not have these awful WARN errors in the console.
My code:
(open-sourced on GitHub)