TypeError: uploadAssetsToS3.default is not a function
See original GitHub issue DEBUG ─ Deploying bucket nbd4dq8-hfq07z in region us-east-1.
DEBUG ─ Checking if bucket nbd4dq8-hfq07z exists.
DEBUG ─ Setting acceleration to "true" for bucket nbd4dq8-hfq07z.
DEBUG ─ Bucket nbd4dq8-hfq07z was successfully deployed to the us-east-1 region.
error:
TypeError: uploadAssetsToS3.default is not a function
at NextjsComponent.deploy (/home/.serverless/components/registry/npm/serverless-next.js@1.15.0-alpha.2/node_modules/serverless-next.js/serverless.js:187:35)
at async fn (/mnt/c/Users/code/myApp/node_modules/@serverless/template/utils.js:280:41)
at async Promise.all (index 0)
at async executeGraph (/mnt/c/Users/code/myApp/node_modules/@serverless/template/utils.js:294:3)
at async Template.default (/mnt/c/Users/code/myApp/node_modules/@serverless/template/serverless.js:67:38)
at async Object.runComponents (/mnt/c/Users/code/myApp/node_modules/@serverless/cli/src/index.js:220:17)
103s › myApp › TypeError: uploadAssetsToS3.default is not a function
serverless-next.js in package.json
"serverless-next.js":"^1.15.0-alpha.2"
my serverless.yml
myApp:
component: serverless-next.js
inputs:
domain: ["mydomain.com"]
serverless --version
Framework Core: 2.18.0
Plugin: 4.4.2
SDK: 2.3.2
Components: 3.4.7
Issue Analytics
- State:
- Created 3 years ago
- Comments:5
Top Results From Across the Web
TypeError: uploadAssetsToS3.default is not a function
TypeError : uploadAssetsToS3.default is not a function.
Read more >NextJS Rewrites TypeError: (0 , _resolveRewrites.default) is ...
Enviroment Variables is working, but rewrites feature is not working ... TypeError: (0 , _resolveRewrites.default) is not a function.
Read more >is not a function or its return value is not iterable in ReactJs ...
React Nodejs Expressjs & MongoDB bug fixing. TypeError : default is not a function or its return value is not iterable in ReactJs...
Read more >(0 , import_defineToJSON.default) is not a function - Bugs
When trying to import '@8base/auth' to a Vite+Vue 3 project, the following error is trigger by the import statement. Uncaught TypeError: (0 ...
Read more >(0 , _resolveRewrites.default) is not a function-Reactjs
Coding example for the question NextJS Rewrites TypeError: (0 , _resolveRewrites.default) is not a function-Reactjs.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hm, the reason is that
uploadAssetsToS3
function was removed from internal package@sls-next/s3-static-assets
in this commit: https://github.com/serverless-nextjs/serverless-next.js/commit/000377d2dbc5c7fab53b11ff7f36b0367d706b49. Due to not pinning internal dependencies properly, 1.15 will try to call this old function from the main component package, but it’s incorrectly using a newer dependency version where this was already removed.I did verify for 1.18 and it is no longer using
uploadAssetsToS3
function at all from the main component and it’s also been removed in internal dependency@sls-next/s3-static-assets
, so not quite sure why you still have same issue.Could you maybe remove all modules in your Serverless registry in case it might be using some old code? I think on Mac it should be in
/Users/<user>/.serverless/components/registry
(sorry, not sure where it would be in other OSes)I see, glad it works now. Resolving this issue.