[英]when running npm install --legacy-peer-deps, got error: Debug Failure. Unhandled SyntaxKind: Unknown
I am trying to run npm install --legacy-peer-deps我正在尝试运行 npm install --legacy-peer-deps
but got some error.但有一些错误。
here is the error:这是错误:
Error: Error on worker #1: Error: Debug Failure. Unhandled SyntaxKind: Unknown.
at pipelineEmitWithHintWorker (portal/node_modules/typescript/lib/typescript.js:113076:22)
Also I added a log on this line typescript.js:113076:22我还在这一行添加了一条日志 typescript.js:113076:22
console.log(node, node.kind)
ts.Debug.fail("Unhandled SyntaxKind: ".concat(ts.Debug.formatSyntaxKind(node.kind), "."));
the output is output 是
t undefined
I think it might be a node version issue, but not sure what is happening, if anyone can help, I am very appreciated.我认为这可能是节点版本问题,但不确定发生了什么,如果有人可以提供帮助,我将不胜感激。 Let me know if anymore infomation need to be provided.
让我知道是否需要提供更多信息。
I had this issue today too.我今天也有这个问题。 I found that targeting Typescript < 4.8 was the key to resolving this issue.
我发现以 Typescript < 4.8 为目标是解决此问题的关键。
In your package.json change your typescript version (dev dependency) to something akin to this: "typescript": "<4.8"
or specifically set the version eg "typescript": "4.6.4"
在您的 package.json 中,将您的 typescript 版本(开发依赖项)更改为类似于此的内容:
"typescript": "<4.8"
或专门设置“typescript”:“<4.8”.644 版本,例如"typescript": "4.6.4"
4
You should check the node_modules folder to ensure that you did not install the 4.8.2 package which I think has this incompatability.您应该检查 node_modules 文件夹以确保您没有安装我认为不兼容的 4.8.2 package。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.