[英]Cannot find module '@testing-library/react'
Although I have installed all the necessary dependencies I still get an error when I run npm test
尽管我已经安装了所有必要的依赖项,但在运行
npm test
时仍然出现错误
Cannot find module '@testing-library/react'
找不到模块'@testing-library/react'
Add "moduleResolution": "node"
in tsconfig.json file.在 tsconfig.json 文件中添加
"moduleResolution": "node"
。
Alternative solution: npm install --save-dev @testing-library/react
替代解决方案:
npm install --save-dev @testing-library/react
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.