gpt4 book ai didi

node.js - 类型错误 : parse is not a function

转载 作者:行者123 更新时间:2023-12-05 08:11:00 28 4
gpt4 key购买 nike

因为我已经在我的应用程序中安装了 Font Awesome 依赖项,并尝试在测试之后立即运行 npm start,我收到了这个错误,它非常棒残酷且难以解决。

$ npm start

> portfolio@0.1.3 start
> react-scripts start

~/Documents/GitHub/REACT/Portfolio/Portfolio/node_modules/css-select/lib/compile.js:31
var token = parse(selector, options);
^

TypeError: parse is not a function
at compileUnsafe (~/Documents/GitHub/REACT/Portfolio/Portfolio/node_modules/css-select/lib/compile.js:31:14)
at Function.compile (~/Documents/GitHub/REACT/Portfolio/Portfolio/node_modules/css-select/lib/compile.js:20:13)
at new Selector (~/Documents/GitHub/REACT/Portfolio/Portfolio/node_modules/renderkid/lib/renderKid/styles/rule/Selector.js:13:26)
at new Rule (~/Documents/GitHub/REACT/Portfolio/Portfolio/node_modules/renderkid/lib/renderKid/styles/Rule.js:10:21)
at StyleSheet.module.exports.StyleSheet._setSingleRule (~/Documents/GitHub/REACT/Portfolio/Portfolio/node_modules/renderkid/lib/renderKid/styles/StyleSheet.js:42:14)
at StyleSheet.module.exports.StyleSheet._setRule (~/Documents/GitHub/REACT/Portfolio/Portfolio/node_modules/renderkid/lib/renderKid/styles/StyleSheet.js:33:12)
at StyleSheet.module.exports.StyleSheet.setRule (~/Documents/GitHub/REACT/Portfolio/Portfolio/node_modules/renderkid/lib/renderKid/styles/StyleSheet.js:22:14)
at Styles.module.exports.Styles._setDefaultStyles (~/Documents/GitHub/REACT/Portfolio/Portfolio/node_modules/renderkid/lib/renderKid/Styles.js:34:25)
at new Styles (~/Documents/GitHub/REACT/Portfolio/Portfolio/node_modules/renderkid/lib/renderKid/Styles.js:30:10)
at RenderKid.module.exports.RenderKid._initStyles (~/Documents/GitHub/REACT/Portfolio/Portfolio/node_modules/renderkid/lib/RenderKid.js:53:27)

我检查了我的 package.json 文件并正确分配了我的启动脚本。我已经解决这个错误将近一天了。

我还检查了所有依赖项以确保它们没有过时。一切都是最新的,但似乎仍然出现错误

我什至试图从我的提交中恢复几步,但不幸的是仍然遇到这个错误所以我相信它必须与模块相关p>

最佳答案

尝试使用较旧的稳定版本而不是新版本。它对我有用..我更改了 packet.json 中的版本并删除了 node_module 文件夹和然后再次使用 npm install

关于node.js - 类型错误 : parse is not a function,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67151943/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com