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.

The "path" argument must be of type string or an instance of URL. Received undefined

See original GitHub issue

Describe the bug

I create Nuxt project and got this error when build project. Minimal Reproductions

npm init nuxt-app demo_project -> UI framework: Windi Css -> Render mode: Universal -> Deploy target: Server npm install npm run build Versions

  • vite-plugin-windicss: 1.8.9
  • vite:4.0.1
  • framework(vue/react/svelte/etc): nuxtjs

Additonal Context console log ` npm run build

testnuxt@1.0.0 build nuxt build

FATAL The “path” argument must be of type string or an instance of URL. Received undefined 11:18:17

at new NodeError (node:internal/errors:372:5) at fileURLToPath (node:internal/url:1420:11) at node_modules/vite-plugin-windicss/dist/index.mjs:119:71 at ModuleJob.run (node:internal/modules/esm/module_job:198:25) at async Promise.all (index 0) at async ESMLoader.import (node:internal/modules/esm/loader:385:24) at async importModuleDynamicallyWrapper (node:internal/vm/module:437:15) at async ModuleContainer.addModule (node_modules/@nuxt/core/dist/core.js:239:20) at async ModuleContainer.ready (node_modules/@nuxt/core/dist/core.js:51:7) at async Nuxt._init (node_modules/@nuxt/core/dist/core.js:478:5)

│ │ │ ✖ Nuxt Fatal Error │ │ │ │ TypeError [ERR_INVALID_ARG_TYPE]: The “path” argument must be of type string or an instance of URL. Received undefined ]

Issue Analytics

  • State:closed
  • Created 9 months ago
  • Reactions:1
  • Comments:7

github_iconTop GitHub Comments

5reactions
YuJian920commented, Dec 13, 2022

You can temporarily use vite-plugin-windicss@1.8.8,Because from version 1.8.9 of vite-plugin-windicss, the dependent version of tsup has been upgraded, and tsup@6.5.0 will follow the configuration in tsconfig.json, and the target in tsconfig.json in vite-plugin-windicss The option is set to es2017, this version will cause an error in import.meta after build

You can see https://github.com/windicss/vite-plugin-windicss/pull/314

2reactions
baoxianggaocommented, Dec 13, 2022

Thank @YuJian920 for your answer. For anyone need to build currently. Please add this section to package.json to overide version of vite-plugin-windicss. "overrides": { "nuxt-windicss": { "vite-plugin-windicss": "1.8.8" } }

also, if you use yarn, maybe you need this: "resolutions": { "vite-plugin-windicss": "1.8.8" }, "overrides": { "nuxt-windicss": { "vite-plugin-windicss": "1.8.8" } }

Read more comments on GitHub >

github_iconTop Results From Across the Web

The "path" argument must be of type string ... - Stack Overflow
I'm working on a project in React and ran into a problem that has me stumped. Whenever I run yarn start I get...
Read more >
[Fix] TypeError [ERR_INVALID_ARG_TYPE]: The “path ...
Have you run into the error “TypeError [ERR_INVALID_ARG_TYPE]: The “path” argument must be of type string. Received undefined”? In this story I'll go...
Read more >
The "path" argument must be of type string. Received ... - GitHub
Converts JSON schema to MD. Actual Behaviour. The following error is thrown: TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of ...
Read more >
The "path" argument must be of type string. Received - YouTube
JavaScript : TypeError [ERR_INVALID_ARG_TYPE]: The "path " argument must be of type string. Received type undefined raised when starting ...
Read more >
[err_invalid_arg_type]: the "path" argument must be of type ...
In Node 15 brfs throw error The "path" argument must be of type string or an instance of Buffer or URL. Received undefined...
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