existsSync is not exported
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- javascript, node.js
- 领域
- build-system, tooling
调研方向
先从错误中指出的 nodePolyfills() 配置和 polyfills/empty.js 路径开始,然后检查从 ../../core/utils/silly-i18n/src/index.js 导入的 existsSync。完成标准是确定或记录提供 browserified shim 的选项,并确认 Rollup 构建不再将 existsSync 报告为缺失。
由索引模型根据 Issue 内容生成。
描述
With this configuration:
import copy from "rollup-plugin-copy";
import sucrase from "@rollup/plugin-sucrase";
import json from "@rollup/plugin-json";
import css from "rollup-plugin-css-only";
import resolve from "@rollup/plugin-node-resolve";
import svg from "rollup-plugin-svg";
import nodePolyfills from 'rollup-plugin-node-polyfills';
export default {
input: "src/index.jsx",
output: {
file: "dist/index.js",
format: "iife",
globals: {
react: "React",
fs: "fs",
path: "path",
"react-dom": "ReactDOM",
},
},
//This is meant to suppress the warning for d3-selection circular dependencies (https://github.com/d3/d3-selection/issues/168)
onwarn: function (warning, warn) {
if (warning.code === "CIRCULAR_DEPENDENCY") return;
warn(warning);
},
plugins: [
svg(),
css({ output: "css/bundle.css" }),
json(),
nodePolyfills(),
sucrase({
transforms: ["jsx"],
production: true,
}),
copy({
targets: [
{
src: [
"node_modules/react/umd/react.development.js",
"node_modules/react-dom/umd/react-dom.development.js",
"src/static/*",
],
dest: "dist",
},
],
verbose: true,
}),
resolve(),
],
external: ["react", "react-dom"],
};
I get this error
[!] Error: 'existsSync' is not exported by node_modules/rollup-plugin-node-polyfills/polyfills/empty.js, imported by ../../core/utils/silly-i18n/src/index.js
It's true that the documentation mentions
optional, add option to enable browserified shim
However, not clear how to add that option. What does it really mean?
- 主要语言
- JavaScript
- 星标
- 142
- 派生
- 64
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
ionic-team/rollup-plugin-node-polyfills 的其他 Issue
-
难度 3/5 1-2 天 新手友好度 35/100
ionic-team/rollup-plugin-node-polyfills#62 · 2 条评论 · 6 个 reaction ·
-
难度 5/5 一周以上 新手友好度 25/100
ionic-team/rollup-plugin-node-polyfills#56 · 11 个 reaction ·
-
难度 3/5 1-2 天 新手友好度 35/100
-
难度 3/5 1-2 天 新手友好度 25/100
-
node:path未关闭
难度 4/5 3-5 天 新手友好度 20/100
ionic-team/rollup-plugin-node-polyfills#51 · 2 个 reaction ·
查看 ionic-team/rollup-plugin-node-polyfills 的全部 Issue
相似的 Issue
-
status: waiting for maintainer
难度 2/5 1-3 小时 新手友好度 74/100
mui/material-ui#49547 ·
维护者通常 1 天内回复
-
[2.x] extension-manager: translation keys that changed meaning keep their old names可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭type/bug
难度 2/5 1-3 小时 新手友好度 84/100
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 66/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 67/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
rescript-lang/rescript#8996 ·
维护者通常 1 天内回复