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

ERROR Internal server error: At least one <template> or <script> is required in a single file component. #638

Closed
Ibochkarev opened this issue Jun 9, 2024 · 9 comments

Comments

@Ibochkarev
Copy link

Ibochkarev commented Jun 9, 2024

In https://github.com/nuxt-modules/storybook/releases/tag/v8.1.1 the error continues to block the use of Storybook

 ERROR  Internal server error: At least one <template> or <script> is required in a single file component.                                                                        2:26:19 PM
  Plugin: vite:vue
  File: /Users/ibochkarev/Projects/v3/src/widgets/templates/w-feed-template/w-video-section-template.vue
      at Object.parse$2 [as parse] (/Users/ibochkarev/Projects/v3/node_modules/.pnpm/@[email protected]/node_modules/@vue/compiler-sfc/dist/compiler-sfc.cjs.js:1921:7)
      at createDescriptor (/Users/ibochkarev/Projects/v3/node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected][email protected]_nuxt@_hv7zc5tdoxa7qtmqb6wsfxacpq/node_modules/@storybook-vue/nuxt/dist/preset.cjs:87:43)
      at transformMain (/Users/ibochkarev/Projects/v3/node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected][email protected]_nuxt@_hv7zc5tdoxa7qtmqb6wsfxacpq/node_modules/@storybook-vue/nuxt/dist/preset.cjs:2380:34)
      at TransformContext.transform (/Users/ibochkarev/Projects/v3/node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected][email protected]_nuxt@_hv7zc5tdoxa7qtmqb6wsfxacpq/node_modules/@storybook-vue/nuxt/dist/preset.cjs:2923:16)
      at Object.transform (file:///Users/ibochkarev/Projects/v3/node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]/node_modules/vite/dist/node/chunks/dep-whKeNLxG.js:51172:62)
      at async loadAndTransform (file:///Users/ibochkarev/Projects/v3/node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]/node_modules/vite/dist/node/chunks/dep-whKeNLxG.js:53923:29)

storybook-vue/storybook-nuxt#4 (comment)

@sbloska
Copy link

sbloska commented Jun 12, 2024

For me i had this error when using nuxt-icon. i got around it by doing this

#462 (comment)

@Ibochkarev
Copy link
Author

@sbloska We don't use external libraries, the problem occurs with internal components.

And accordingly your solution is not suitable.

@tobiasdiez
Copy link
Collaborator

This should be fixed in the main branch, but requires a new release of the packages/storybook-nuxt package. @chakAs3

@Ibochkarev
Copy link
Author

@chakAs3 please help!

@Ibochkarev
Copy link
Author

@tobiasdiez Hello! Please tell me how you can use the latest versions from Github without waiting for the release?

@Archetipo95
Copy link

@tobiasdiez this is still a problem in the current build

@tillsanders
Copy link

Hint: I realized that my problem with this was in fact caused by an issue with my own vite config.

@chakAs3
Copy link
Collaborator

chakAs3 commented Oct 9, 2024

@Archetipo95 @tillsanders can you use the latest release 8.3.1 and let me know please.

@tillsanders
Copy link

It seems my issue was unrelated after all, so I cannot test this. Good luck!

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