Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR: The URL must be of scheme file when using with @nuxt/icon on Windows #72

Closed
tobiasdiez opened this issue Sep 23, 2024 · 3 comments

Comments

@tobiasdiez
Copy link

On Windows (and only there), when @nuxt/icon is used the following error is thrown when running nuxt prepare:

 ERROR  The URL must be of scheme file                                                                                                                                                                                                               10:11:49  

  at fileURLToPath (node:internal/url:1499:11)
  at fileURLToPath (/D:/Programming/nuxt-storybook/node_modules/.pnpm/mlly@1.7.1/node_modules/mlly/dist/index.mjs:1971:25)
  at pathToFileURL (/D:/Programming/nuxt-storybook/node_modules/.pnpm/mlly@1.7.1/node_modules/mlly/dist/index.mjs:1974:26)
  at _resolve (/D:/Programming/nuxt-storybook/node_modules/.pnpm/mlly@1.7.1/node_modules/mlly/dist/index.mjs:2108:10)
  at resolveSync (/D:/Programming/nuxt-storybook/node_modules/.pnpm/mlly@1.7.1/node_modules/mlly/dist/index.mjs:2111:10)
  at resolvePathSync (/D:/Programming/nuxt-storybook/node_modules/.pnpm/mlly@1.7.1/node_modules/mlly/dist/index.mjs:2121:24)
  at useComponentMetaParser (/D:/Programming/nuxt-storybook/node_modules/.pnpm/nuxt-component-meta@0.8.2_magicast@0.3.5_rollup@4.21.0_webpack-sources@3.2.3/node_modules/nuxt-component-meta/dist/parser.mjs:45:22)
  at /D:/Programming/nuxt-storybook/node_modules/.pnpm/nuxt-component-meta@0.8.2_magicast@0.3.5_rollup@4.21.0_webpack-sources@3.2.3/node_modules/nuxt-component-meta/dist/module.mjs:184:16
  at async /D:/Programming/nuxt-storybook/node_modules/.pnpm/nuxt@3.13.2_@parcel+watcher@2.4.1_@types+node@22.5.5_encoding@0.1.13_eslint@9.11.0_jiti@1.21._wweoqk3ugykrtijmbhvnbu5cwi/node_modules/nuxt/dist/index.mjs:2385:7
  at async generateApp (/D:/Programming/nuxt-storybook/node_modules/.pnpm/nuxt@3.13.2_@parcel+watcher@2.4.1_@types+node@22.5.5_encoding@0.1.13_eslint@9.11.0_jiti@1.21._wweoqk3ugykrtijmbhvnbu5cwi/node_modules/nuxt/dist/index.mjs:5250:3)
  at async _applyPromised (/D:/Programming/nuxt-storybook/node_modules/.pnpm/perfect-debounce@1.0.0/node_modules/perfect-debounce/dist/index.mjs:54:10)

The error is triggered at

const filePath = resolvePathSync(component.filePath)
where filepath is

D:/Programming/nuxt-storybook/node_modules/.pnpm/@nuxt+icon@1.4.4_magicast@0.3.5_rollup@4.21.0_vite@5.4.7_@types+node@22.5.5_sass@1.77.7_terse_a3xy66mctyjhya3mtap5zijhji/node_modules/@nuxt/icon/dist/runtime/components/index  

which is not existing (the real file name is index.js). Components for other modules have the existing full path like node_modules/@nuxt/ui/dist/runtime/components/elements/Icon.vue, which works.

This was introduced somewhere in between 0.6 > 0.8, see nuxt-modules/storybook#775. Most likely in #69.

@larbish
Copy link
Contributor

larbish commented Oct 4, 2024

This seems related to an issue in nuxt/icon. Might be resolved once nuxt/icon#262 is merged.

@larbish
Copy link
Contributor

larbish commented Oct 4, 2024

@tobiasdiez Just released: https://github.com/nuxt/icon/releases/tag/v1.5.3

Can you confirm it fixes your issue?

@tobiasdiez
Copy link
Author

Yeah, it is working now! Thanks for the ping!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants