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

Unable to shamefully hoist set to false in pnpm workspaces #1079

Closed
Xenossolitarius opened this issue Oct 25, 2023 · 1 comment
Closed

Unable to shamefully hoist set to false in pnpm workspaces #1079

Xenossolitarius opened this issue Oct 25, 2023 · 1 comment

Comments

@Xenossolitarius
Copy link

Xenossolitarius commented Oct 25, 2023

INFO
As of latest nuxt doesn't need to be shamefully hoisted in pnpm monorepo nuxt/nuxt#14146 (comment)
This module breaks when nuxt is not shamefully hoisted. Also using the nuxt the recommended way with shamefully-hoist=true and hitting pnpm up will cause the exact error pasted below.
Advice or any kind of help is appreciated.

✘ [ERROR] Could not resolve "#imports"

    ../../node_modules/.pnpm/@[email protected]/node_modules/@nuxt/image/dist/runtime/components/nuxt-img.mjs:6:36:
      6 │ import { useHead, useNuxtApp } from "#imports";
        ╵                                     ~~~~~~~~~~

  You can mark the path "#imports" as external to exclude it from the bundle, which will remove this
  error.

✘ [ERROR] Could not resolve "#build/image-options"

    ../../node_modules/.pnpm/@[email protected]/node_modules/@nuxt/image/dist/runtime/composables.mjs:2:29:
      2 │ import { imageOptions } from "#build/image-options";
        ╵                              ~~~~~~~~~~~~~~~~~~~~~~

  You can mark the path "#build/image-options" as external to exclude it from the bundle, which will
  remove this error.

✘ [ERROR] Could not resolve "#imports"

    ../../node_modules/.pnpm/@[email protected]/node_modules/@nuxt/image/dist/runtime/composables.mjs:3:45:
      3 │ import { useNuxtApp, useRuntimeConfig } from "#imports";
        ╵                                              ~~~~~~~~~~

  You can mark the path "#imports" as external to exclude it from the bundle, which will remove this
  error.

✘ [ERROR] Could not resolve "#imports"

    ../../node_modules/.pnpm/@[email protected]/node_modules/@nuxt/image/dist/runtime/utils/prerender.mjs:2:32:
      2 │ import { useRequestEvent } from "#imports";
        ╵                                 ~~~~~~~~~~

  You can mark the path "#imports" as external to exclude it from the bundle, which will remove this
  error.

✘ [ERROR] Could not resolve "#imports"

    ../../node_modules/.pnpm/@[email protected]/node_modules/@nuxt/image/dist/runtime/components/_base.mjs:3:25:
      3 │ import { useImage } from "#imports";
        ╵                          ~~~~~~~~~~

  You can mark the path "#imports" as external to exclude it from the bundle, which will remove this
  error.


 ERROR  error while updating dependencies:                                                                                                                                                                                                                 10:54:37 PM
Error: Build failed with 5 errors:
../../node_modules/.pnpm/@[email protected]/node_modules/@nuxt/image/dist/runtime/components/_base.mjs:3:25: ERROR: Could not resolve "#imports"
../../node_modules/.pnpm/@[email protected]/node_modules/@nuxt/image/dist/runtime/components/nuxt-img.mjs:6:36: ERROR: Could not resolve "#imports"
../../node_modules/.pnpm/@[email protected]/node_modules/@nuxt/image/dist/runtime/composables.mjs:2:29: ERROR: Could not resolve "#build/image-options"
../../node_modules/.pnpm/@[email protected]/node_modules/@nuxt/image/dist/runtime/composables.mjs:3:45: ERROR: Could not resolve "#imports"
../../node_modules/.pnpm/@[email protected]/node_modules/@nuxt/image/dist/runtime/utils/prerender.mjs:2:32: ERROR: Could not resolve "#imports"
    at failureErrorWithLog (/home/ipesic/feg-casino-portal/node_modules/.pnpm/[email protected]/node_modules/esbuild/lib/main.js:1649:15)
    at /home/ipesic/feg-casino-portal/node_modules/.pnpm/[email protected]/node_modules/esbuild/lib/main.js:1058:25
    at /home/ipesic/feg-casino-portal/node_modules/.pnpm/[email protected]/node_modules/esbuild/lib/main.js:1525:9
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
@Baroshem
Copy link
Collaborator

Closing as currently in pnpm this module works as expected.

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