-
Notifications
You must be signed in to change notification settings - Fork 21
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
problem using in akamai edgworkers #54
Comments
@blueo thanks a lot of for reporting the issue. We will take a look and see what can be done. As workaround you could provide your own |
Thanks @artur-ciocanu I'll give it a go - at the moment I've pegged back a few versions but ideally I could just provide it as you say. |
Hi, for the above issue which I also facing please code provide the code snippet for workaround because I tried creating a polyfill for crypto , nothing works for me. Thanks rollup.config.js
crypto polyfill -
|
@blueo please code you help me out maybe? Thanks |
@daminisinha that looks like it could be a good way around the problem - this is a while ago so I can't quite remember but I had a similar problem trying to pollyfill. I think the main issue was trying to pollyfill the 'import 'crypto' statement in However I ran into another road block shortly after - it turns out there are some performance limits in edgworkers - particularly the JavaScript initialization timeout. No matter what I did with the code example above just having this library in the bundle meant that I hit the initialisation limit on a cold start. This pretty much made it unworkable for us so we ended up using the Akamai Audience Segmentation product instead. Not perfect but got us there in the end - sorry this isn't more helpful 🤷 |
Thanks @blueo for your response :) . |
Somehow crypto error has gone and I started getting new error while using a package Seems like when we do yarn build this package throws an error. [!] Error: 'default' is not exported by node_modules/@adobe/target-nodejs-sdk/dist/targetclient.browser.js, imported by src/index.ts import TargetClient from '@adobe/target-nodejs-sdk'; Does anybody know the fix about the same? Thanks |
Expected Behaviour
I expect I can use the sdk in an akamai edgeworker
Actual Behaviour
Edgeworker static validation fails
Reproduce Scenario (including but not limited to)
Steps to Reproduce
import sdk version > 2.1.1 to an akamai edgworker js file
Upload edgworker using cli (eg
akamai ew upload --codeDir ./ [workerID]
reported error:
Platform and Version
akamai edgeworker
Sample Code that illustrates the problem
main.js :
i'm working from this example: https://github.com/artur-ciocanu/odd-akamai-edge-workers/
if I pin my version to 2.1.1 then I can avoid the issue
Logs taken while reproducing problem
The text was updated successfully, but these errors were encountered: