Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

danielroe
Copy link
Member

πŸ”— Linked issue

πŸ“š Description

This suppresses this warning:

[3:50:47 PM]  WARN  "file:///nuxt/nuxt/packages/nuxt/src/core/runtime/nitro/cache-driver.ts" is imported by "virtual:#internal/nitro/virtual/storage", but could not be resolved – treating it as an external dependency.

However, we need to investigate why the existing inline rule which already covers distDir isn't working for file URLs. This is likely an upstream issue in nitro or possibly pathe/etc. (Perhaps we are wrongly calling isAbsolute on the file URL and getting false?) (cc: @pi0)

Copy link

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

'internal:nuxt:prerender': {
driver: pathToFileURL(await resolvePath(join(distDir, 'core/runtime/nitro/cache-driver'))).href,
// TODO: resolve upstream where file URLs are not being resolved/inlined correctly
driver: isWindows ? pathToFileURL(cacheDriverPath).href : cacheDriverPath,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice idea but not sure how all rollup plugins support file URLs currently. Additionally, i think we should investigate why we need this workaround for windows in first place. nitro should normalize to file URL for windows even if driver path is absolute.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pi0
Still getting this warning on Windows. Have you guys had a chance to investigate this at all? Maybe fix it for Nitro 3.0?
Thank you!

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

Successfully merging this pull request may close these issues.

4 participants