小编Jua*_*rez的帖子

如何修复错误node_modules对打字稿的反应?

我尝试删除node_modules并重新安装它,但它不起作用。该项目运行良好,直到出现以下错误:

ERROR in ./node_modules/cookie-signature/index.js 4:13-30
Module not found: Error: Can't resolve 'crypto' in '/home/juandav/react-app-store/my-store/node_modules/cookie-signature'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
        - add a fallback 'resolve.fallback: { "crypto": require.resolve("crypto-browserify") }'
        - install 'crypto-browserify'
If you don't want to include a polyfill, you can use …
Run Code Online (Sandbox Code Playgroud)

node-modules typescript reactjs

5
推荐指数
1
解决办法
2379
查看次数

标签 统计

node-modules ×1

reactjs ×1

typescript ×1