Node.js TypeError:无法读取属性';版本';运行npx时的未定义值

Node.js TypeError:无法读取属性';版本';运行npx时的未定义值,node.js,npm,npx,Node.js,Npm,Npx,在使用npx运行任何东西时,我已经面临一个问题很长时间了 例如,在运行docusaurus init命令时。请注意,这不是docusaurus特有的。无论我用npx做什么,它总是抛出相同的错误 npx@docusaurus/init@latest初始化文档经典版 已抛出此错误并退出npm TypeError:无法读取未定义的属性“版本” 下面是从debug.log中提取的问题的堆栈跟踪 131 verbose stack at Arborist.[saveIdealTree] (D:\n

在使用
npx
运行任何东西时,我已经面临一个问题很长时间了

例如,在运行docusaurus init命令时。请注意,这不是docusaurus特有的。无论我用npx做什么,它总是抛出相同的错误

npx@docusaurus/init@latest初始化文档经典版

已抛出此错误并退出npm

TypeError:无法读取未定义的属性“版本”

下面是从debug.log中提取的问题的堆栈跟踪

131 verbose stack     at Arborist.[saveIdealTree] (D:\nvm\v15.5.0\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\reify.js:869:33)
131 verbose stack     at D:\nvm\v15.5.0\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\reify.js:131:39
131 verbose stack     at async Arborist.reify (D:\nvm\v15.5.0\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\reify.js:127:5)
131 verbose stack     at async exec (D:\nvm\v15.5.0\node_modules\npm\lib\exec.js:234:7)