Skip to content

[BUG] throw error in web browser #36

@cyio

Description

@cyio

Bug Description

method is undefined

Steps to Reproduce

Expected Behavior

Actual Behavior

throw error

Stack Traces or Screenshots

Image
utils.js:27 Uncaught TypeError: Cannot read properties of undefined (reading 'map')
    at node_modules/.pnpm/[email protected]/node_modules/express/lib/utils.js (utils.js:27:27)
    at __require2 (chunk-HM4MQYWN.js?v=a450a639:15:50)
    at node_modules/.pnpm/[email protected]/node_modules/express/lib/application.js (application.js:20:15)
    at __require2 (chunk-HM4MQYWN.js?v=a450a639:15:50)
    at node_modules/.pnpm/[email protected]/node_modules/express/lib/express.js (express.js:18:13)
    at __require2 (chunk-HM4MQYWN.js?v=a450a639:15:50)
    at node_modules/.pnpm/[email protected]/node_modules/express/index.js (index.js:11:18)
    at __require2 (chunk-HM4MQYWN.js?v=a450a639:15:50)
    at paymailRouter.ts:1:54
node_modules/.pnpm/[email protected]/node_modules/express/lib/utils.js	@	utils.js:27
__require2	@	chunk-HM4MQYWN.js?v=a450a639:15
node_modules/.pnpm/[email protected]/node_modules/express/lib/application.js	@	application.js:20
__require2	@	chunk-HM4MQYWN.js?v=a450a639:15
node_modules/.pnpm/[email protected]/node_modules/express/lib/express.js	@	express.js:18
__require2	@	chunk-HM4MQYWN.js?v=a450a639:15
node_modules/.pnpm/[email protected]/node_modules/express/index.js	@	index.js:11
__require2	@	chunk-HM4MQYWN.js?v=a450a639:15
(anonymous)	@	paymailRouter.ts:1

Environment

  • "@bsv/paymail": "^2.1.1",
  • Chrome
  • Node v20

Additional Information

The reason by AI analysis is that node:http does not work in browser environments. Use require('http') if the code needs to run in the browser.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions