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

RollupError: Could not resolve ../../../utils #438

Closed
schaubes opened this issue Apr 26, 2024 · 7 comments
Closed

RollupError: Could not resolve ../../../utils #438

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

Comments

@schaubes
Copy link

After todays update to v1.4.0 using pnpm I get following error:

ERROR  RollupError: Could not resolve "../../../utils" from "node_modules/.pnpm/nuxt-security@1.4.0_rollup@4.16.4/node_modules/nuxt-security/dist/runtime/nitro/plugins/00-routeRules.mjs"

Version

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

Reproduction Link

Can post if necessary

Steps to reproduce

Initializing a new nuxt app with pnpm and adding nuxt-security

npx nuxi@latest init test-app
cd test-app/

# add nuxt-security
npx nuxi module add security

# run dev server with pnpm
pnpm run dev

What is Expected?

pnpm run dev should start normally

What is actually happening?

ERROR  RollupError: Could not resolve "../../../utils" from "node_modules/.pnpm/nuxt-security@1.4.0_rollup@4.16.4/node_modules/nuxt-security/dist/runtime/nitro/plugins/00-routeRules.mjs"
@schaubes schaubes added the bug Something isn't working label Apr 26, 2024
@MarijnFK
Copy link

Jup, same here

@Baroshem
Copy link
Owner

Hey, thanks for reporting this issue. We are on it!

@Baroshem
Copy link
Owner

This is really strange. At first I thought that the issue is related to wrong dist generation (I copied the dist to the node modules of the project) and project started working.

But it can be something else, still investigating.

@Baroshem
Copy link
Owner

It should work now with 1.4.2. @MarijnFK @schaubes could you verify?

@vejja I needed to add a copy of defuReplaceArray to the utils of the runtime. The import works locally but fails when released in a published dist package.

@vejja
Copy link
Collaborator

vejja commented Apr 26, 2024

It should work now with 1.4.2. @MarijnFK @schaubes could you verify?

@vejja I needed to add a copy of defuReplaceArray to the utils of the runtime. The import works locally but fails when released in a published dist package.

Ah yes makes sense now

@garyellow
Copy link

It should work now with 1.4.2. @MarijnFK @schaubes could you verify?

@vejja I needed to add a copy of defuReplaceArray to the utils of the runtime. The import works locally but fails when released in a published dist package.

It works with v1.4.2
thx~~

@MarijnFK
Copy link

Quickly fixed, thanks!

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

5 participants