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

Could not resolve "#app/entry" #670

Closed
simon-kramer opened this issue Jul 3, 2024 · 8 comments
Closed

Could not resolve "#app/entry" #670

simon-kramer opened this issue Jul 3, 2024 · 8 comments

Comments

@simon-kramer
Copy link

simon-kramer commented Jul 3, 2024

As described in the title, i get the error following. I do not get the issue here. The issue only appears after updating to 8.1.11 of storybook. With 8.1.9 the setup runs just fine. Important Note: Its a Nuxt Layer structure with tailwindcss, etc.

✘ [ERROR] Could not resolve "#app/entry"

    node_modules/@storybook-vue/nuxt/dist/preview.mjs:7:31:
      7 │   const nuxtApp = () => import('#app/entry').then((m) => m.default);
        ╵                                ~~~~~~~~~~~~

  You can mark the path "#app/entry" as external to exclude it from the bundle, which will remove
  this error and leave the unresolved path in the bundle. You can also add ".catch()" here to handle
  this failure at run-time instead of bundle-time.


 ERROR  error while updating dependencies:                                                                                                                                   10:43:08 AM
Error: Build failed with 1 error:
node_modules/@storybook-vue/nuxt/dist/preview.mjs:7:31: ERROR: Could not resolve "#app/entry"
    at failureErrorWithLog (/Users/layer/ui/node_modules/esbuild/lib/main.js:1472:15)
    at /Users/layer/ui/node_modules/esbuild/lib/main.js:945:25
    at /Users/layer/ui/node_modules/esbuild/lib/main.js:1353:9
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Uploaded-using-RayThis-Extension(1)
Uploaded-using-RayThis-Extension(2)
Uploaded-using-RayThis-Extension(3)
Uploaded-using-RayThis-Extension(4)

@NRodriguezcuellar
Copy link

does deleting your node_modules resolve the issue?

@simon-kramer
Copy link
Author

simon-kramer commented Jul 3, 2024

Sadly it doesn't. I tried every way i could imagine, reinstalling, node_modules del, nuxt cleanup etc.

@tobiasdiez
Copy link
Collaborator

This is fixed by #619 (not yet released)

@devbyray
Copy link

devbyray commented Jul 4, 2024

This is fixed by #619 (not yet released)

That is awesome! When will it be released?

@BloodWorkXGaming
Copy link

We are also running into this issue.
Glad to hear there is a fix! Will it be released soon? If yes, any time estiamte?
If no, is there a workaround for now?

Thank you!

@tobiasdiez
Copy link
Collaborator

It will be released as soon as Chakir has time for it: #667

@obulat
Copy link
Contributor

obulat commented Jul 11, 2024

I tried the new release, and I'm now getting new errors:

WARN  Sourcemap for "/virtual:/@storybook/builder-vite/setup-addons.js" points to missing source files
WARN  Sourcemap for "/virtual:/@storybook/builder-vite/vite-app.js" points to missing source files

✘ [ERROR] Could not resolve "virtual:nuxt-runtime-config"

    ...@storybook-vue/nuxt/dist/preview.mjs:5:30:
      5 │ import { runtimeConfig } from 'virtual:nuxt-runtime-config';
        ╵                               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
You can mark the path "virtual:nuxt-runtime-config" as external to exclude it from the bundle, which will remove this error and leave the unresolved path in the bundle.

✘ [ERROR] Could not resolve "#build/css"

    .../@storybook-vue/nuxt/dist/preview.mjs:6:7:
      6 │ import '#build/css';
        ╵        ~~~~~~~~~~~~

You can mark the path "#build/css" as external to exclude it from the bundle, which will remove this error and leave the unresolved path in the bundle.

✘ [ERROR] Could not resolve "#build/plugins"

    .../@storybook-vue/nuxt/dist/preview.mjs:7:20:
      7 │ import plugins from '#build/plugins';
        ╵                     ~~~~~~~~~~~~~~~~
  You can mark the path "#build/plugins" as external to exclude it from the bundle, which will remove this error and leave the unresolved path in the bundle.

 ERROR  error while updating dependencies:
Error: Build failed with 3 errors:
.../@storybook-vue/nuxt/dist/preview.mjs:5:30: ERROR: Could not resolve "virtual:nuxt-runtime-config"
.../@storybook-vue/nuxt/dist/preview.mjs:6:7: ERROR: Could not resolve "#build/css"
.../@storybook-vue/nuxt/dist/preview.mjs:7:20: ERROR: Could not resolve "#build/plugins"
    at failureErrorWithLog (/Users/obulat/Documents/openverse/openverse/node_modules/.pnpm/esbuild@0.21.5/node_modules/esbuild/lib/main.js:1472:15)
    at .../.pnpm/esbuild@0.21.5/node_modules/esbuild/lib/main.js:945:25
    at .../.pnpm/esbuild@0.21.5/node_modules/esbuild/lib/main.js:1353:9
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

paths redacted

Here are the storybook-related package versions (from pnpm list)

  • @storybook/addon-essentials 8.2.1
  • @storybook/vue3 8.2.1
  • @storybook/addon-interactions 8.2.1
  • @storybook/addon-links 8.2.1
  • @nuxtjs/storybook 8.1.1
  • @storybook/blocks 8.2.1
  • @storybook/builder-vite 8.2.1
  • storybook 8.2.1
  • @storybook-vue/nuxt 0.2.10
  • @storybook/test 8.2.1

Nuxt version is 3.12.2

Seems that the latest @nuxtjs/storybook release is broken: I tried manually replacing 8.1.1version with8.1.2, and then I got Cannot find module '.../@nuxtjs/storybook/dist/module.cjs'error, andnpmpage lists onlypackage.jsonin thecode` tab for this package: https://www.npmjs.com/package/@nuxtjs/storybook?activeTab=code

@tobiasdiez
Copy link
Collaborator

@obulat do you get these warnings/errors during the build of this package? In this case, it should be fixed by #695. Or do you get this while using the package? In this case, could you please open a new issue? Thanks!

tobiasdiez added a commit that referenced this issue Jul 11, 2024
<!---
☝️ PR title should follow conventional commits
(https://conventionalcommits.org)
-->

### 🔗 Linked issue

<!-- If it resolves an open issue, please link the issue here. For
example "Resolves #123" -->

### ❓ Type of change

<!-- What types of changes does your code introduce? Put an `x` in all
the boxes that apply. -->

- [ ] 📖 Documentation (updates to the documentation or readme)
- [ ] 🐞 Bug fix (a non-breaking change that fixes an issue)
- [ ] 👌 Enhancement (improving an existing functionality)
- [ ] ✨ New feature (a non-breaking change that adds functionality)
- [ ] 🧹 Chore (updates to the build process or auxiliary tools and
libraries)
- [ ] ⚠️ Breaking change (fix or feature that would cause existing
functionality to change)

### 📚 Description

Maybe fixes the errors reported at
#670 (comment).
<!-- Describe your changes in detail -->
<!-- Why is this change required? What problem does it solve? -->
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

6 participants