module is not defined

未关闭
#4 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
30/100
Issue 类型
缺陷
描述清晰度
需要澄清
活跃度
停滞
技术栈
javascript, react-native

调研方向

首先检查 dist/tuple.mjs 和堆栈跟踪中显示的浏览器 bundle 路径,然后在使用 react-native-web 的 Chrome 中重现该故障。当 immutable-tuple 依赖在该环境中不再引发“module is not defined”时,工作即完成。

由索引模型根据 Issue 内容生成。

描述

Hi Ben, I don't get this error in React Native iOS or Android, but I do in Chrome with react-native-web. I don't know whether it's something you can publish an update to fix, or if I need to ask React Native or react-native-web to do an additional compilation step or something? 😄

$ npm ls immutable-tuple
/code/myapp
└─┬ [email protected]
 └─┬ [email protected]
   └─┬ [email protected]
     └── [email protected]
bundle.js:140912 Uncaught ReferenceError: module is not defined
   at Module.../../../../../../../../../code/myapp/node_modules/immutable-tuple/dist/tuple.mjs (bundle.js:140912)
   at __webpack_require__ (bundle.js:725)
   at fn (bundle.js:102)
   at Object.../../../../../../../../../code/myapp/node_modules/optimism/lib/index.js (bundle.js:174120)
   at __webpack_require__ (bundle.js:725)
   at fn (bundle.js:102)
   at Module.../../../../../../../../../code/myapp/node_modules/apollo-cache-inmemory/lib/optimism.js (bundle.js:47234)
   at __webpack_require__ (bundle.js:725)
   at fn (bundle.js:102)
   at Module.../../../../../../../../../code/myapp/node_modules/apollo-cache-inmemory/lib/readFromStore.js (bundle.js:47426)
   at __webpack_require__ (bundle.js:725)
   at fn (bundle.js:102)
   at Module.../../../../../../../../../code/myapp/node_modules/apollo-cache-inmemory/lib/inMemoryCache.js (bundle.js:46854)
   at __webpack_require__ (bundle.js:725)
   at fn (bundle.js:102)
   at Module.../../../../../../../../../code/myapp/node_modules/apollo-cache-inmemory/lib/index.js (bundle.js:47137)
   at __webpack_require__ (bundle.js:725)
   at fn (bundle.js:102)
   at Object.../../../../../../../../../code/myapp/node_modules/aws-appsync/lib/client.js (bundle.js:65093)
   at __webpack_require__ (bundle.js:725)
   at fn (bundle.js:102)
   at Object.../../../../../../../../../code/myapp/node_modules/aws-appsync/lib/index.js (bundle.js:66186)
   at __webpack_require__ (bundle.js:725)
   at fn (bundle.js:102)
   at Object.../../../../../../../../../code/myapp/node_modules/aws-appsync-react/lib/rehydrated.js (bundle.js:64799)
   at __webpack_require__ (bundle.js:725)
   at fn (bundle.js:102)
   at Object.../../../../../../../../../code/myapp/node_modules/aws-appsync-react/lib/index.js (bundle.js:64670)
   at __webpack_require__ (bundle.js:725)
   at fn (bundle.js:102)
   at Module.../../../../../../../../../code/myapp/App.js (bundle.js:824)
   at __webpack_require__ (bundle.js:725)
   at fn (bundle.js:102)
   at Module.../../../../../../../../../code/myapp/node_modules/expo/AppEntry.js (bundle.js:114414)
   at __webpack_require__ (bundle.js:725)
   at fn (bundle.js:102)
   at Object.0 (bundle.js:281583)
   at __webpack_require__ (bundle.js:725)
   at bundle.js:792
   at bundle.js:795
主要语言
JavaScript
星标
38
派生
3
PR 合并指标
30 天内没有已合并 PR

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

benjamn/immutable-tuple 的其他 Issue

查看 benjamn/immutable-tuple 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。