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

routeRules import paths error in v1.4.0 #439

Closed
maxdzin opened this issue Apr 26, 2024 · 5 comments
Closed

routeRules import paths error in v1.4.0 #439

maxdzin opened this issue Apr 26, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@maxdzin
Copy link

maxdzin commented Apr 26, 2024

Version

nuxt-security: v1.4.0
nuxt: v3.11.2

Reproduction Link

https://stackblitz.com/edit/github-ymby1y

Steps to reproduce

Just see the console output

What is Expected?

Nuxt app to be launched without errors.

What is actually happening?

[nitro 10:34:45 AM]  ERROR  RollupError: Could not resolve "../../../utils" from "node_modules/nuxt-security/dist/runtime/nitro/plugins/00-routeRules.mjs"

It seems need to be ../../utils instead. And the paths in files inside dist/runtime/nitro/plugins/... need to be checked as well.

@maxdzin maxdzin added the bug Something isn't working label Apr 26, 2024
@garyellow
Copy link

same issue on Vercel
nuxt-security: v1.4.1

image

@maxdzin
Copy link
Author

maxdzin commented Apr 26, 2024

Oops! It seems already reported in another issue #438 while I prepared this one 😄

@Baroshem
Copy link
Owner

Can you guys try 1.4.2? I tried it and it seems to be working :)

@maxdzin
Copy link
Author

maxdzin commented Apr 26, 2024

@Baroshem it works. I removed the module from deps and installed it via command:
npx nuxi@latest module add security
now it is added as dependency (previously it was dev dependency). I already asked that in the discussion: is there a reason to move that to deps instead of dev deps?

@Baroshem
Copy link
Owner

Closing the issue then. @maxdzin lets continue this discussion in the discussion created by you :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants