molecule icon indicating copy to clipboard operation
molecule copied to clipboard

bug: react'version to 18.x. quick-start 运行不起来。

Open WheatMaThink opened this issue 2 years ago • 3 comments

Describe the bug

根据 https://dtstack.github.io/molecule/zh-CN/docs/quick-start 操作步骤执行。

Versions

  • OS: mac os
  • Browser: chrome
  • Molecule:

package.json 文件内容:

{ "name": "molecule-demo", "version": "0.1.0", "private": true, "dependencies": { "@dtinsight/molecule": "^1.1.1", "@testing-library/jest-dom": "^5.16.5", "@testing-library/react": "^13.3.0", "@testing-library/user-event": "^13.5.0", "@types/jest": "^27.5.2", "@types/node": "^16.11.56", "@types/react": "^18.0.18", "@types/react-dom": "^18.0.6", "react": "^18.2.0", "react-dom": "^18.2.0", "react-scripts": "5.0.1", "typescript": "^4.8.2", "web-vitals": "^2.1.4" }, "scripts": { "start": "react-scripts start", "build": "react-scripts build", "test": "react-scripts test", "eject": "react-scripts eject" }, "eslintConfig": { "extends": [ "react-app", "react-app/jest" ] }, "browserslist": { "production": [ ">0.2%", "not dead", "not op_mini all" ], "development": [ "last 1 chrome version", "last 1 firefox version", "last 1 safari version" ] } }

异常信息:

image

WheatMaThink avatar Aug 31 '22 14:08 WheatMaThink

@wheatma38 谢谢问题反馈,你如果本地添加了 <React.Strict>, 可以先去掉一下试试。

wewoor avatar Sep 01 '22 01:09 wewoor

@wewoor 去掉 <React.Strict>. 可以运行,感谢各位开源这么好的软件。

WheatMaThink avatar Sep 01 '22 04:09 WheatMaThink

是因为 react-custom-scrollbars 不支持 react18 的严格模式,而且这个包已经不维护了。我们会在下个版本想办法替换这个包

mortalYoung avatar Sep 02 '22 03:09 mortalYoung