اذهب إلى المحتوى
  • 0

خطأ مفاجئ في مشروع mern

محمود سعداوي2

السؤال

السلام عليكم.

ظهرت لي رسائل الخطأ التالية بشكل مفاجئ.

في الكونسول: رسالة الخطأ

cookie.js:32 Uncaught Error: Cannot find module 'net'
    at webpackMissingModule (cookie.js:32:1)
    at ../node_modules/tough-cookie/lib/cookie.js (cookie.js:32:1)
    at options.factory (react refresh:6:1)
    at __webpack_require__ (bootstrap:24:1)
    at fn (hot module replacement:62:1)
    at ../node_modules/request/lib/cookies.js (cookies.js:3:1)
    at options.factory (react refresh:6:1)
    at __webpack_require__ (bootstrap:24:1)
    at fn (hot module replacement:62:1)
    at ../node_modules/request/index.js (index.js:18:1)

صفحة الويب:

ERROR in ../node_modules/sshpk/lib/private-key.js 7:13-30
Module not found: Error: Can't resolve 'crypto' in 'C:\Users\saadaoui\Desktop\dev_tawassol\node_modules\sshpk\lib'

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 an empty module like this:
	resolve.fallback: { "crypto": false }
ERROR in ../node_modules/sshpk/lib/signature.js 7:13-30
Module not found: Error: Can't resolve 'crypto' in 'C:\Users\saadaoui\Desktop\dev_tawassol\node_modules\sshpk\lib'

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 an empty module like this:
	resolve.fallback: { "crypto": false }
ERROR in ../node_modules/sshpk/lib/utils.js 27:13-30
Module not found: Error: Can't resolve 'crypto' in 'C:\Users\saadaoui\Desktop\dev_tawassol\node_modules\sshpk\lib'

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 an empty module like this:
	resolve.fallback: { "crypto": false }
ERROR in ../node_modules/tough-cookie/lib/cookie.js 33:10-24
Module not found: Error: Can't resolve 'net' in 'C:\Users\saadaoui\Desktop\dev_tawassol\node_modules\tough-cookie\lib'
ERROR in ../node_modules/tough-cookie/lib/cookie.js 34:15-35
Module not found: Error: Can't resolve 'url' in 'C:\Users\saadaoui\Desktop\dev_tawassol\node_modules\tough-cookie\lib'

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: { "url": require.resolve("url/") }'
	- install 'url'
If you don't want to include a polyfill, you can use an empty module like this:
	resolve.fallback: { "url": false }
ERROR in ../node_modules/tunnel-agent/index.js 3:10-24
Module not found: Error: Can't resolve 'net' in 'C:\Users\saadaoui\Desktop\dev_tawassol\node_modules\tunnel-agent'
ERROR in ../node_modules/tunnel-agent/index.js 4:8-22
Module not found: Error: Can't resolve 'tls' in 'C:\Users\saadaoui\Desktop\dev_tawassol\node_modules\tunnel-agent'
ERROR in ../node_modules/tunnel-agent/index.js 5:9-24
Module not found: Error: Can't resolve 'http' in 'C:\Users\saadaoui\Desktop\dev_tawassol\node_modules\tunnel-agent'

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: { "http": require.resolve("stream-http") }'
	- install 'stream-http'
If you don't want to include a polyfill, you can use an empty module like this:
	resolve.fallback: { "http": false }
ERROR in ../node_modules/tunnel-agent/index.js 6:10-26
Module not found: Error: Can't resolve 'https' in 'C:\Users\saadaoui\Desktop\dev_tawassol\node_modules\tunnel-agent'

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: { "https": require.resolve("https-browserify") }'
	- install 'https-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
	resolve.fallback: { "https": false }
ERROR in ../node_modules/tunnel-agent/index.js 8:11-28
Module not found: Error: Can't resolve 'assert' in 'C:\Users\saadaoui\Desktop\dev_tawassol\node_modules\tunnel-agent'

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: { "assert": require.resolve("assert/") }'
	- install 'assert'
If you don't want to include a polyfill, you can use an empty module like this:
	resolve.fallback: { "assert": false }

vs code => terminal

 ERROR in ../node_modules/tunnel-agent/index.js 3:10-24
[1] Module not found: Error: Can't resolve 'net' in 'C:\Users\saadaoui\Desktop\dev_tawassol\node_modules\tunnel-agent'
[1]
[1] ERROR in ../node_modules/tunnel-agent/index.js 4:8-22
[1] Module not found: Error: Can't resolve 'tls' in 'C:\Users\saadaoui\Desktop\dev_tawassol\node_modules\tunnel-agent'
[1]
[1] ERROR in ../node_modules/tunnel-agent/index.js 5:9-24
[1] Module not found: Error: Can't resolve 'http' in 'C:\Users\saadaoui\Desktop\dev_tawassol\node_modules\tunnel-agent'
[1] 
[1] BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
[1] This is no longer the case. Verify if you need this module and configure a polyfill for it.
[1]
[1] If you want to include a polyfill, you need to:
[1]     - add a fallback 'resolve.fallback: { "http": require.resolve("stream-http") }'
[1]     - install 'stream-http'
[1] If you don't want to include a polyfill, you can use an empty module like this:
[1]     resolve.fallback: { "http": false }
[1]
[1] ERROR in ../node_modules/tunnel-agent/index.js 6:10-26
[1] Module not found: Error: Can't resolve 'https' in 'C:\Users\saadaoui\Desktop\dev_tawassol\node_modules\tunnel-agent'
[1] 
[1] BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
[1] This is no longer the case. Verify if you need this module and configure a polyfill for it.
[1]
[1] If you want to include a polyfill, you need to:
[1]     - add a fallback 'resolve.fallback: { "https": require.resolve("https-browserify") }'
[1]     - install 'https-browserify'
[1] If you don't want to include a polyfill, you can use an empty module like this:
[1]     resolve.fallback: { "https": false }
[1]
[1] ERROR in ../node_modules/tunnel-agent/index.js 8:11-28
[1] Module not found: Error: Can't resolve 'assert' in 'C:\Users\saadaoui\Desktop\dev_tawassol\node_modules\tunnel-agent'
[1] 
[1] BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
[1] This is no longer the case. Verify if you need this module and configure a polyfill for it.
[1]
[1] If you want to include a polyfill, you need to:
[1]     - add a fallback 'resolve.fallback: { "assert": require.resolve("assert/") }'
[1]     - install 'assert'
[1] If you don't want to include a polyfill, you can use an empty module like this:
[1]     resolve.fallback: { "assert": false }

شكرا على المساعدة

 

رابط هذا التعليق
شارك على الشبكات الإجتماعية

Recommended Posts

لا توجد أي إجابات على هذا السؤال بعد

انضم إلى النقاش

يمكنك أن تنشر الآن وتسجل لاحقًا. إذا كان لديك حساب، فسجل الدخول الآن لتنشر باسم حسابك.

زائر
أجب على هذا السؤال...

×   لقد أضفت محتوى بخط أو تنسيق مختلف.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   جرى استعادة المحتوى السابق..   امسح المحرر

×   You cannot paste images directly. Upload or insert images from URL.

  • إعلانات

  • تابعنا على



×
×
  • أضف...