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

akamai edgeworkers upload failed when bundle.tgz size is over 128KB #33

Open
takashito opened this issue Jun 5, 2021 · 0 comments
Open

Comments

@takashito
Copy link

akamai edgeworkers upload --bundle ./dist/bundle.tgz $npm_package_ewid

TypeError: preparedBody.substring is not a function
at Object.contentHash (/Users/taito/.akamai-cli/src/cli-edgeworkers/node_modules/edgegrid/src/helpers.js:57:37)
at Object.dataToSign (/Users/taito/.akamai-cli/src/cli-edgeworkers/node_modules/edgegrid/src/helpers.js:78:14)
at Object.signRequest (/Users/taito/.akamai-cli/src/cli-edgeworkers/node_modules/edgegrid/src/helpers.js:146:39)
at makeAuthHeader (/Users/taito/.akamai-cli/src/cli-edgeworkers/node_modules/edgegrid/src/auth.js:40:58)
at Object.generateAuth (/Users/taito/.akamai-cli/src/cli-edgeworkers/node_modules/edgegrid/src/auth.js:65:37)
at EdgeGrid.auth (/Users/taito/.akamai-cli/src/cli-edgeworkers/node_modules/edgegrid/src/api.js:69:23)
at /Users/taito/.akamai-cli/src/cli-edgeworkers/bin/src/cli-httpRequest.js:52:18
at new Promise ()
at servicePromise (/Users/taito/.akamai-cli/src/cli-edgeworkers/bin/src/cli-httpRequest.js:51:16)
at Object.sendEdgeRequest (/Users/taito/.akamai-cli/src/cli-edgeworkers/bin/src/cli-httpRequest.js:85:65)
npm ERR! code 1
npm ERR! path /Users/taito/Google Drive/#00 Development/edgeworker/ew-graphql
npm ERR! command failed
npm ERR! command sh -c akamai edgeworkers upload --bundle ./dist/bundle.tgz $npm_package_ewid

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/taito/.npm/_logs/2021-06-05T12_17_40_799Z-debug.log
ERROR: "upload" exited with 1.
error Command failed with exit code 1.

looks like maxBody size is set to 128KB.
module.exports = {
generateAuth: function(request, clientToken, clientSecret, accessToken, host, maxBody, guid, timestamp) {
maxBody = maxBody || 131072;
guid = guid || uuid.v4();
timestamp = timestamp || helpers.createTimestamp();

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

No branches or pull requests

1 participant