Module not found: Error: Can't resolve 'https'

Đang mở
#24 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
25/100
Loại issue
Lỗi
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
nodejs, typescript, webpack
Lĩnh vực
build-system

Hướng nghiên cứu

Reproduce the Node v20 webpack build and inspect node_modules/serpapi/esm/src/utils.js, where the missing https and querystring modules are reported. Determine whether the package or consuming build is expected to provide the resolution, then verify that the build completes without these errors.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

I get these error message for node v20
ERROR in ./node_modules/serpapi/esm/src/utils.js 2:0-26
Module not found: Error: Can't resolve 'https' in '/Users/yasaman/Desktop/safariz/node_modules/serpapi/esm/src'

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/serpapi/esm/src/utils.js 3:0-29
Module not found: Error: Can't resolve 'querystring' in '/Users/yasaman/Desktop/safariz/node_modules/serpapi/esm/src'

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

Ngôn ngữ chính
TypeScript
Star
95
Fork
33
Merge trung bình
8 ngày 12 giờ
Pull request đã merge (30 ngày)
2

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của serpapi/serpapi-javascript

Tất cả issue của serpapi/serpapi-javascript

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.