workers-sdk icon indicating copy to clipboard operation
workers-sdk copied to clipboard

🐛 BUG: Plugin "unenv-cloudflare" returned a non-absolute path: buffer (set a namespace if this is not a file path)

Open oyeesam opened this issue 1 year ago • 1 comments

Which Cloudflare product(s) does this pertain to?

Pages

What version(s) of the tool(s) are you using?

[email protected]

What version of Node are you using?

No response

What operating system and version are you using?

v20.11.0

Describe the Bug

Observed behavior

I am using iron-session package, which with wrangler prevew command is giving me following error


✘ [ERROR] Plugin "unenv-cloudflare" returned a non-absolute path: buffer (set a namespace if this is not
 a file path)

    ../node_modules/.pnpm/[email protected]/node_modules/iron-webcrypto/dist/index.js:3:23:
      3 │ var index_js = require('buffer/index.js');
        ╵                        ~~~~~~~~~~~~~~~~~



✘ [ERROR] Failed to build Functions at ./functions.

I am using Remix

Please provide a link to a minimal reproduction

No response

Please provide any relevant error logs

✘ [ERROR] Plugin "unenv-cloudflare" returned a non-absolute path: buffer (set a namespace if this is not a file path)

../node_modules/.pnpm/[email protected]/node_modules/iron-webcrypto/dist/index.js:3:23:
  3 │ var index_js = require('buffer/index.js');
    ╵                        ~~~~~~~~~~~~~~~~~

✘ [ERROR] Failed to build Functions at ./functions.

oyeesam avatar Oct 04 '24 13:10 oyeesam

Hiya, this looks like an issue with the iron-webcrypto package. It looks like you're using quite an old version there, are you able to update iron-session which uses a more recent version of iron-webcrypto? Think iron-webcrypto needs to be a later than 0.4.0.

emily-shen avatar Oct 10 '24 13:10 emily-shen

We haven't heard from you in while so I'm going to close this issue for now. If you're still running into problems feel free to open a new issue with more details and we can investigate further.

penalosa avatar Nov 08 '24 20:11 penalosa