node 提示: Cannot find module 'path' or its corresponding type declarations.Cannot find module 'node:url' or its corresponding type declarations.
Cannot find module 'path' or its corresponding type declarations.
Cannot find module 'node:url' or its corresponding type declarations.
1.安装 types
yarn add @types/node
2.在tsconfig.json中添加
"compilerOptions": { "types": [ "node" ] }