首页 > 解决方案 > 节点抛出“TypeError:无法读取 null 的属性 '1'”错误

问题描述

错误

我刚刚启动了我的反应开发服务器,现在节点抛出了一个

TypeError:无法读取 null 的属性“1”

错误。我检查了我的 npm 版本,它的 v14.17.1。

有人知道可能导致问题的原因吗?昨天运行完全相同的设置,没有任何问题。

完整的堆栈跟踪:

Uncaught TypeError: Cannot read property '1' of null
at Object.<anonymous> (node-version.js:5)
at Object../node_modules/default-resolution/node-version.js (node-version.js:10)
at __webpack_require__ (bootstrap:851)
at fn (bootstrap:150)
at Object../node_modules/default-resolution/index.js (index.js:3)
at __webpack_require__ (bootstrap:851)
at fn (bootstrap:150)
at Object../node_modules/last-run/index.js (index.js:7)
at __webpack_require__ (bootstrap:851)
at fn (bootstrap:150)
at Object.<anonymous> (createExtensions.js:3)
at Object../node_modules/undertaker/lib/helpers/createExtensions.js (createExtensions.js:73)
at __webpack_require__ (bootstrap:851)
at fn (bootstrap:150)
at Object../node_modules/undertaker/lib/series.js (series.js:8)
at __webpack_require__ (bootstrap:851)
at fn (bootstrap:150)
at Object../node_modules/undertaker/index.js (index.js:10)
at __webpack_require__ (bootstrap:851)
at fn (bootstrap:150)
at Object../node_modules/gulp/index.js (index.js:4)
at __webpack_require__ (bootstrap:851)
at fn (bootstrap:150)
at Module.<anonymous> (Index.js:182)
at Module../src/views/User.js (User.js:253)
at __webpack_require__ (bootstrap:851)
at fn (bootstrap:150)
at Module.<anonymous> (Auth.js:111)
at Module../src/routes.js (routes.js:94)
at __webpack_require__ (bootstrap:851)
at fn (bootstrap:150)
at Module.<anonymous> (index.js:30)
at Module../src/layouts/Admin.js (Admin.js:96)
at __webpack_require__ (bootstrap:851)
at fn (bootstrap:150)
at Module.<anonymous> (API.js:16)
at Module../src/components/App.js (App.js:36)
at __webpack_require__ (bootstrap:851)
at fn (bootstrap:150)
at Module.<anonymous> (Sidebar.js:278)
at Module../src/index.js (index.js:30)
at __webpack_require__ (bootstrap:851)
at fn (bootstrap:150)
at Object.1 (Tables.js:1797)
at __webpack_require__ (bootstrap:851)
at checkDeferredModules (bootstrap:45)
at Array.webpackJsonpCallback [as push] (bootstrap:32)
at main.chunk.js:1

标签: reactjsnpmversion

解决方案


推荐阅读