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

[BUG] CloudFlare Pages: EvalError: Code generation from strings disallowed for this context #40

Open
regisphilibert opened this issue Jul 14, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@regisphilibert
Copy link

Description

The package fails on CloudFlare Workers / Cloudflare Pages Functions

Steps to reproduce

Scenario: I'm trying to use atomic-algolia in a CloudFlare Pages Functions
When using atomic-algolia with CF Pages Functions Wrangler throws this error: EvalError: Code generation from strings disallowed for this context
[pages:err] EvalError: Code generation from strings disallowed for this context
    at Function (<anonymous>)
    at node_modules/regenerator-runtime/runtime.js (/Users/regisphilibert/Boulot/tnd/retroreport.org/node_modules/regenerator-runtime/runtime.js:747:3)
    at __require2 (/var/folders/t7/9pbqz9_17llf0v0x7k3nxnkm0000gn/T/functionsWorker-0.9821669927980017.js:16:50)
    at node_modules/@babel/runtime/regenerator/index.js (/Users/regisphilibert/Boulot/tnd/retroreport.org/node_modules/@babel/runtime/regenerator/index.js:1:18)
    at __require2 (/var/folders/t7/9pbqz9_17llf0v0x7k3nxnkm0000gn/T/functionsWorker-0.9821669927980017.js:16:50)
    at node_modules/atomic-algolia/lib/utils/getRemoteIndex.js (/Users/regisphilibert/Boulot/tnd/retroreport.org/node_modules/atomic-algolia/lib/utils/getRemoteIndex.js:5:43)
    at __require2 (/var/folders/t7/9pbqz9_17llf0v0x7k3nxnkm0000gn/T/functionsWorker-0.9821669927980017.js:16:50)
    at node_modules/atomic-algolia/lib/update.js (/Users/regisphilibert/Boulot/tnd/retroreport.org/node_modules/atomic-algolia/lib/update.js:17:22)
    at __require2 (/var/folders/t7/9pbqz9_17llf0v0x7k3nxnkm0000gn/T/functionsWorker-0.9821669927980017.js:16:50)
    at node_modules/atomic-algolia/lib/index.js (/Users/regisphilibert/Boulot/tnd/retroreport.org/node_modules/atomic-algolia/lib/index.js:6:14)

This thread is not about this package, but makes me think there is no workaround.

System information

atomic-algolia version: 0.3.19
node version: v16.14.2
npm version: 8.5.0
system OS: 12.4 (21F79)

More

Note that CloudFlare Pages Functions do not have a log available yet. So I'm not able to see if the error is present outside on local development using Wrangler.

CloudFlare security has this restriction, it seems Vercel as well but not sure.

@regisphilibert regisphilibert added the bug Something isn't working label Jul 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant