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

bug: 开启mako后构建出错:Module not found: Can't resolve 'dumi/theme/builtins/Container #2209

Open
zhangfisher opened this issue Sep 27, 2024 · 3 comments
Assignees

Comments

@zhangfisher
Copy link

zhangfisher commented Sep 27, 2024

Version

2.4.12

OS Version

windows 10

Node.js Version

18

Browser Version

chrome 120

Link to minimal reproduction

https://github.com/zhangfisher/autostore/docs

Steps to reproduce

包管理器 : pnpm

启用mako构建后提示:

 × Module not found: Can't resolve 'dumi/theme/builtins/Container'
   ╭─[..\node_modules\.pnpm\[email protected]_@[email protected]_@[email protected]_@[email protected]_@[email protected]_esli_eww3v6fp2hppnov7eysctl4qoa\node_modules\dumi\dist\client\theme-api\DumiDemo\DemoErrorBoundary.js:1:1]
 1 │ import Container from 'dumi/theme/builtins/Container';


  × Module not found: Can't resolve 'dumi/theme/builtins/Previewer'
   ╭─[..\node_modules\.pnpm\[email protected]_@[email protected]_@[email protected]_@[email protected]_@[email protected]_esli_eww3v6fp2hppnov7eysctl4qoa\node_modules\dumi\dist\client\theme-api\DumiDemo\index.js:2:1]
 2 │ import { SP_ROUTE_PREFIX } from "../../../constants";
 3 │ import { useAppData, useDemo, useSiteData } from 'dumi';
 4 │ import React, { createElement } from 'react';
 5 │ import Previewer from 'dumi/theme/builtins/Previewer';
   ·                       ───────────────────────────────
 6 │ import { useRenderer } from "../useRenderer";
 7 │ import DemoErrorBoundary from "./DemoErrorBoundary";
 8 │ var InternalDumiDemo = function InternalDumiDemo(props) {
   ╰────


  × Module not found: Can't resolve 'dumi/theme/slots/ContentTabs'
    ╭─[..\node_modules\.pnpm\[email protected]_@[email protected]_@[email protected]_@[email protected]_@[email protected]_esli_eww3v6fp2hppnov7eysctl4qoa\node_modules\dumi\dist\client\theme-api\DumiPage.js:5:1]
  5 │ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; 
} finally { if (_d) throw _e; } } return _arr; } }
  6 │ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
  7 │ import { useRouteMeta } from 'dumi';
  8 │ import ContentTabs from 'dumi/theme/slots/ContentTabs';
    ·                         ──────────────────────────────
  9 │ import React, { useState } from 'react';
 10 │ import { useTabQueryState } from "./useTabMeta";
 11 │ export var DumiPage = function DumiPage(props) {
    ╰────

所有dumi/theme/xxxx均无法发现模块

What is expected?

成功构建

What is actually happening?

成功构建

Any additional comments? (optional)

No response

@Jinbao1001
Copy link
Member

复现仓库无法访问.

@Jinbao1001 Jinbao1001 self-assigned this Sep 29, 2024
@zhangfisher
Copy link
Author

@Jinbao1001
Copy link
Member

测试 pnpm@8pnpm@9 未复现上述问题.

不过有其他报错信息 moduleId 越界, 节后排查下.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants