【发布时间】:2022-02-18 02:34:22
【问题描述】:
我刚刚将node升级到最新版本v16.13.1 我试图运行一个现有项目,但它因以下错误而崩溃:
performance.now = present;
^
TypeError: Cannot assign to read only property 'now' of object '#<Performance>'
at Function.present.conflict (/Project_Path/node_modules/mstime/dist/cjs/present.js:39:19)
at Object.<anonymous> (/Project_Path/node_modules/mstime/dist/cjs/present.js:41:9)
at Module._compile (node:internal/modules/cjs/loader:1101:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
at Object.require.extensions.<computed> [as .js] (/Project_Path/node_modules/ts-node/src/index.ts:485:14)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.<anonymous> (/Project_Path/node_modules/mstime/dist/cjs/index.js:5:16)
有人可以向我解释这个错误以及如何解决它吗?
【问题讨论】:
-
如果我们不知道什么性能是很难说的。在项目中搜索一下,给我们一些思路,最好是更多代码
-
能否把项目代码发给我们。