question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

nuxt (Bootstrap Vue) - The "path" argument must be of type string

See original GitHub issue
  • Operating System: Win10
  • Node Version: 10.16.0
  • NPM Version: 6.9.0
  • webpack Version: 4
  • mini-css-extract-plugin Version: 0.7.0

I hate to report this as a bug as it’s likely something I just do not have properly configured but this issue only arises when I include MiniCssExtractPlugin in my plugins

Expected Behavior

plugin extracts CSS into separate files

Actual Behavior

i Preparing project for development i Initial build may take a while √ Builder initialized

ERROR The “path” argument must be of type string. Received type undefined

at validateString (internal/validators.js:125:11) at Object.extname (path.js:830:5) at uniqBy_1.options.plugins.map (node_modules@nuxt\builder\dist\builder.js:5671:58) at Array.map (<anonymous>) at Builder.normalizePlugins (node_modules@nuxt\builder\dist\builder.js:5667:28) at Builder.generateRoutesAndFiles (node_modules@nuxt\builder\dist\builder.js:5640:36) at Builder.build (node_modules@nuxt\builder\dist\builder.js:5575:16)

Code

https://gist.github.com/jeffster9/2562288df68fbe672933a40258312f5d

How Do We Reproduce?

# npx create-nuxt-app mini-css-extract-plugin-test ? Project name mini-css-extract-plugin-test ? Project description test mini-css-extract-plugin ? Author name author ? Choose the package manager Npm ? Choose UI framework Bootstrap Vue < not sure if this is the issue? ? Choose custom server framework None (Recommended) ? Choose Nuxt.js modules Axios ? Choose linting tools eslint ? Choose test framework None ? Choose rendering mode Universal (SSR)

add mini-css-extract-plugin to nuxt.config.js

# npm run dev

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
jeffsta9commented, Jul 19, 2019

Here’s a repo of an installation following the reproduction steps outlined above: https://github.com/jeffster9/test-mini-css-extract-plugin

All I did was install Nuxt (w/ Bootstrap Vue as the framework), tested (successfully), installed mini-css-extract-plugin and tested again, receiving the error “The “path” argument must be of type string…”

I don’t doubt that it’s due to a configuration adjusted by Nuxt but I have searched the web for an answer and haven’t been able to resolve the issue. All the other plugins I use work without issue, though. So, I’m finally resorting to reporting this to your team in hopes that you can explain why this is occurring.

I appreciate you looking into it and am looking forward to including this plugin in my project. The strange thing is that is is the plugin presented by Nuxt for this task; so, you’d think it’d work right “out of the box.” Anyway, thanks in advance.

0reactions
jeffsta9commented, Aug 5, 2019

It was my mistake. I was adding directly with the Nuxt config and not adding to the build section in the Nuxt config as seen here https://nuxtjs.org/faq/webpack-plugins/. 😕 facepalm

Read more comments on GitHub >

github_iconTop Results From Across the Web

Nuxt throws 'The "path" argument must be of type string' or ...
This is a new bug that is already fixed and pending to be released. More info can be found here: Latest Nuxt v2.15.7...
Read more >
#Nuxt.js ERROR The “path” argument must be of type string ...
i missed config ( e.g see bellow, array in array ). “#Nuxt.js ERROR The “path” argument must be of type string.
Read more >
[Solved]-How to fix: 'The "path" argument must be of type string ...
Coding example for the question How to fix: 'The "path" argument must be of type string. Received type undefined' when running 'vue add...
Read more >
the "path" argument must be of type string. received ... - You.com
ERROR @nuxt/ui-templates The "path" argument must be of type string. Received an instance of Array 19:24:41 at new NodeError .
Read more >
Form Input | Components - BootstrapVue
Note: Range inputs (as do all input types) return their value as a string. You may need to convert the value to a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found