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

[plugin node-resolve] Could not resolve import "nitropack/runtime" #98

Closed
wuiyang opened this issue Jun 9, 2024 · 1 comment
Closed

Comments

@wuiyang
Copy link

wuiyang commented Jun 9, 2024

After I have installed Nuxt Auth Utils, I am unable to do npm run dev as it would gives me an error.

[plugin node-resolve] Could not resolve import "nitropack/runtime" in [project-path]/node_modules/@nuxthub/core/dist/runtime/ready.dev.js using exports defined in [project-path]/node_modules/nitropack/package.json.

Upon checking, it was caused by this code
https://github.com/Atinux/nuxt-auth-utils/blob/c323edc75d10af8f7481df81ff4f7c54622192d0/src/runtime/server/plugins/oauth.ts#L2

I'm using nitropack@2.9.4 in the project.

They suggested to use import from '#imports', but that would caused an issue for module developer to target imports: false user. They updated the code to allow direct import from nitropack/runtime at v2.9.5 at this commit

However, based on unjs/nitro#2314 pull request, it seems like it would be a temporary fix rather than actual implementation. It might be good to put a reminder that this import might not work in the future.

Is it possible to update documentation website about the import error and suggest to update nitropack to v2.9.5 or higher?

Copy link
Owner

atinux commented Jun 10, 2024

Sorry about this @wuiyang

Is it possible to update documentation website about the import error and suggest to update nitropack to v2.9.5 or higher?

Do you mean in the readme? If so, are you happy to open a PR?

@atinux atinux closed this as completed Jul 30, 2024
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