当前位置:网站首页>Uncaught TypeError: Cannot set property ‘next‘ of undefined 报错解决
Uncaught TypeError: Cannot set property ‘next‘ of undefined 报错解决
2022-06-11 11:29:00 【Michael18811380328】
Uncaught TypeError: Cannot set property ‘next’ of undefined 报错解决
今天开发遇到一个问题,界面报错如下:

TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
at validateString (internal/validators.js:120:11)
at Object.join (path.js:1039:7)
at noopServiceWorkerMiddleware (/Users/seafile/Desktop/code-seafile/seatable-plugin-timeline/node_modules/react-dev-utils/noopServiceWorkerMiddleware.js:14:26)
at Layer.handle [as handle_request] (/Users/seafile/Desktop/code-seafile/seatable-plugin-timeline/node_modules/express/lib/router/layer.js:95:5)
at trim_prefix (/Users/seafile/Desktop/code-seafile/seatable-plugin-timeline/node_modules/express/lib/router/index.js:317:13)
at /Users/seafile/Desktop/code-seafile/seatable-plugin-timeline/node_modules/express/lib/router/index.js:284:7
at Function.process_params (/Users/seafile/Desktop/code-seafile/seatable-plugin-timeline/node_modules/express/lib/router/index.js:335:12)
at next (/Users/seafile/Desktop/code-seafile/seatable-plugin-timeline/node_modules/express/lib/router/index.js:275:10)
at launchEditorMiddleware (/Users/seafile/Desktop/code-seafile/seatable-plugin-timeline/node_modules/react-dev-utils/errorOverlayMiddleware.js:20:7)
at Layer.handle [as handle_request] (/Users/seafile/Desktop/code-seafile/seatable-plugin-timeline/node_modules/express/lib/router/layer.js:95:5)
中文翻译是
未捕获的TypeError:无法设置未定义的属性“next”
报错原因
大部分网友反馈的问题是:
noopServiceWorkerMiddleware 这个库和其他第三方库不兼容
目前遇到下面三个依赖早期版本和 noopServiceWorkerMiddleware 不兼容,那么升级即可
“react-scripts”: “^3.4.0”
“node-sass”: “^4.11.1”
“sass-loader”: “^7.3.0”
npm install [email protected] [email protected] [email protected]
或者本地安装的 node 早期版本不兼容,更新一下本地的 node 到新版
# 安装 node 版本管理工具
sudo npm i -g n --force
# 安装稳定版本 node
n --stable
具体可以参考这个博客(https://blog.csdn.net/guzhao593/article/details/81712016)
我这边进行这两个操作后,重新打包,JS 部分就不会报错,可以正常使用了。
参考链接
https://stackoverflow.com/questions/61354145/the-path-argument-must-be-of-type-string-received-undefined-not-sure-why
https://blog.csdn.net/guzhao593/article/details/81712016
边栏推荐
- 202年最新热门收益较高的年金险产品是什么?
- 中级web开发工程师,面试题+笔记+项目实战
- Method of converting VOC format data set to Yolo format data set
- Liufan, CFO of papaya mobile, unleashes women's innovative power in the digital age
- 拆分数据---水平拆分和纵向拆分
- 修改 WordPress 管理账号名称插件:Admin renamer extended
- Display of receiving address list 【 project mall 】
- WordPress user name modification plug-in: username changer
- msf cs openssl流量加密
- 广东市政安全施工资料管理软件2022新表格来啦
猜你喜欢

MSF CS OpenSSL traffic encryption

Liufan, CFO of papaya mobile, unleashes women's innovative power in the digital age

再不刷题就晚了,最全的BAT大厂面试题整理

李飞飞:我更像物理学界的科学家,而不是工程师|深度学习崛起十年

設置默認收貨地址【項目 商城】

Iterator mode -- battlefield autumn point

企业微信小程序避坑指南,欢迎补充。。。

2022 | framework for Android interview -- Analysis of the core principles of binder, handler, WMS and AMS!

SpingBoot+Quartrz生产环境的应用支持分布式、自定义corn、反射执行多任务

苹果MobileOne: 移动端仅需1ms的高性能骨干
随机推荐
Runtime reconfiguration of etcd
文件excel导出
Bark – 自己给自己的 iPhone 发推送提醒 – 最简单的推送提醒服务,开源免费
灵动边栏(Widget)插件:MO Widgets
web开发选型,web开发毕业谁
设置默认收货地址【项目 商城】
It will be too late if you don't brush the questions. The most complete bat interview questions
Etcd的运行时重配置
Maximum water container
Eulato
Smart sidebar plug-in: Mo widgets
How to solve the problem that high-precision positioning technologies such as ultra wideband UWB, Bluetooth AOA and RTK cannot be widely used due to their high cost? Adopt the idea of integrated deplo
Web development model selection, who graduated from web development
Iterator mode -- battlefield autumn point
爱可可AI前沿推介(6.11)
Modify WordPress management account name plug-in: admin rename extended
JS interview questions - arrow function, find and filter some and every
Interpretation of cube technology | past and present life of cube Rendering Design
拆分数据---水平拆分和纵向拆分
普通人应当如何挑选年金险产品?