You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// MIcon.story.vue
<template>
<Story>
Simple story in Nuxt
<n-button type="tertiary">
Tertiary
</n-button>
</Story>
</template>
<script setup lang="ts">
import {NButton} from 'naive-ui'
</script>
使用时报错:
import { VResizeObserver } from 'vueuc';
^^^^^^^^^^^^^^^
SyntaxError: Named export 'VResizeObserver' not found. The requested module 'vueuc' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:
import pkg from 'vueuc';
const { VResizeObserver } = pkg;
Error while collecting story /Users/messchow/code/mess_admin/design/MIcon/MIcon.story.vue:
Error: Cannot find module /Users/messchow/code/mess_admin/node_modules/.pnpm/@babel+runtime@7.24.8/node_modules/@babel/runtime/helpers/esm imported from file:///Users/messchow/code/mess_admin, file:///Users/messchow/code/, file:///Users/messchow/code/mess_admin/_index.js, file:///Users/messchow/code/node_modules
at _resolve (file:///Users/messchow/code/mess_admin/node_modules/.pnpm/mlly@1.7.1/node_modules/mlly/dist/index.mjs:2102:19)
at resolveSync (file:///Users/messchow/code/mess_admin/node_modules/.pnpm/mlly@1.7.1/node_modules/mlly/dist/index.mjs:2111:10)
at resolvePathSync (file:///Users/messchow/code/mess_admin/node_modules/.pnpm/mlly@1.7.1/node_modules/mlly/dist/index.mjs:2121:24)
at resolvePath (file:///Users/messchow/code/mess_admin/node_modules/.pnpm/mlly@1.7.1/node_modules/mlly/dist/index.mjs:2125:28)
at isValidNodeImport (file:///Users/messchow/code/mess_admin/node_modules/.pnpm/mlly@1.7.1/node_modules/mlly/dist/index.mjs:2585:30)
at _shouldExternalize (file:///Users/messchow/code/mess_admin/node_modules/.pnpm/vite-node@0.34.7_sass@1.79.3/node_modules/vite-node/dist/server.mjs:78:32)
at shouldExternalize (file:///Users/messchow/code/mess_admin/node_modules/.pnpm/vite-node@0.34.7_sass@1.79.3/node_modules/vite-node/dist/server.mjs:55:19)
at ViteNodeServer.shouldExternalize (file:///Users/messchow/code/mess_admin/node_modules/.pnpm/vite-node@0.34.7_sass@1.79.3/node_modules/vite-node/dist/server.mjs:225:12)
at ViteNodeServer._fetchModule (file:///Users/messchow/code/mess_admin/node_modules/.pnpm/vite-node@0.34.7_sass@1.79.3/node_modules/vite-node/dist/server.mjs:322:36)
at ViteNodeServer.fetchModule (file:///Users/messchow/code/mess_admin/node_modules/.pnpm/vite-node@0.34.7_sass@1.79.3/node_modules/vite-node/dist/server.mjs:261:14)
at Object.fetchModule (file:///Users/messchow/code/mess_admin/node_modules/.pnpm/histoire@0.17.17_sass@1.79.3_vite@5.3.4/node_modules/histoire/dist/node/collect/index.js:50:37)
at MessagePort.<anonymous> (file:///Users/messchow/code/mess_admin/node_modules/.pnpm/birpc@0.1.1/node_modules/birpc/dist/index.mjs:16:41)
at [nodejs.internal.kHybridDispatch] (node:internal/event_target:826:20)
描述错误
使用时报错:
#4641 根据讨论内容添加:
使用后的报错信息如下:
相关的文章:histoire-dev/histoire#488
复现步骤
pnpm install
npm run story:dev
最小复现链接
https://github.com/messchow/test
系统信息
使用的包管理器
pnpm
验证
The text was updated successfully, but these errors were encountered: