Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace path dependency with node:path #142

Open
boehs opened this issue Aug 18, 2024 · 0 comments
Open

Replace path dependency with node:path #142

boehs opened this issue Aug 18, 2024 · 0 comments

Comments

@boehs
Copy link

boehs commented Aug 18, 2024

✘ [ERROR] Could not resolve "path"

    ../node_modules/.pnpm/@[email protected][email protected]/node_modules/@elysiajs/swagger/dist/index.mjs:277:17:
      277 │ import path from "path";
          ╵                  ~~~~~~

  The package "path" wasn't found on the file system but is built into node. Are you trying to
  bundle for node? You can use "platform: 'node'" to do that, which will remove this error.

per https://developers.cloudflare.com/workers/runtime-apis/nodejs/

Node.js APIs are available under the node: prefix, and this prefix must be used when importing modules, both in your code and the npm packages you depend on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant