Closed maxjoygit closed 8 months ago
@maxjoygit can you provide an example? I would think that it should already work.
X [ERROR] Could not resolve "node:path"
node_modules/eta/dist/eta.module.mjs:1:22:
1 │ import * as path from 'node:path';
╵ ~~~~~~~~~~~
You can mark the path "node:path" as external to exclude it from the bundle, which will remove this error.
X [ERROR] Could not resolve "node:fs"
node_modules/eta/dist/eta.module.mjs:2:20:
2 │ import * as fs from 'node:fs';
╵ ~~~~~~~~~
You can mark the path "node:fs" as external to exclude it from the bundle, which will remove this error.
X [ERROR] Build failed with 2 errors:
node_modules/eta/dist/eta.module.mjs:1:22: ERROR: Could not resolve "node:path" node_modules/eta/dist/eta.module.mjs:2:20: ERROR: Could not resolve "node:fs"
@maxjoygit from https://developers.cloudflare.com/workers/runtime-apis/nodejs/path/:
To use Node.js APIs in your Worker, add the nodejs_compat compatibility flag to your wrangler.toml file.
I did, but not working Can I have working example app?
@maxjoygit sorry, I don't have any working examples to share right now.
if possible :)