-
Notifications
You must be signed in to change notification settings - Fork 970
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?]: nftPack: undefined is not a function #10528
Comments
@jayhyp Can you confirm that you have files in |
This happens to us as well after an rw upgrade to 7.5. Working perfectly fine on 6.x. No other code changes apart from the upgrade, also using the serverless deployment method. Have reverted to 6.x again for now - but will investigate further once time allows. As a sidenote - this worked fine on ~7.2 (but then hit the Auth issue that was resolved). |
@jwwisgerhof Thanks for the additional information. |
@Tobbe Yes, just checked and last I tried to upgrade to RW was 7.2.0-rc.53. The deployment worked correctly but we ran into the Authorization header issue, forcing a downgrade to 6.x. |
HI @jwwisgerhof re "the Authorization header issue" is that the lower vs uppercase issue to recognizing "Authorization"? That was fixed in https://github.com/redwoodjs/redwood/releases/tag/v7.3.2 |
Hi @dthyresson - yes, that is the one. I am aware it was fixed, which is why I tried the upgrade to RW 7 again. It is relevant to this ticket only in that it narrows the window in which this bug was introduced to somewhere between RW7.2.0-rc.53 and current version. Packaging of functions worked in 7.2.0-rc.53 but does not in 7.5.x (same codebase). |
Thanks for the extra detail @jwwisgerhof -- do you think I can reproduce this with any small new RW project and the Looking at the code
Maybe Could we see if the following packages have been installed in your project?
Seems like it cannot find |
Thanks @dthyresson - can confirm that Let me have a look later today to see if I can find out more information now that I know where to look. |
Fixes #10528 Simple fix that restores Serverless deployment functionality. --------- Co-authored-by: David Thyresson <dthyresson@gmail.com>
Fixes #10528 Simple fix that restores Serverless deployment functionality. --------- Co-authored-by: David Thyresson <dthyresson@gmail.com>
Fixes #10528 Simple fix that restores Serverless deployment functionality. --------- Co-authored-by: David Thyresson <dthyresson@gmail.com>
What's not working?
Deploying Redwood API to Serverless Deploy using the following command fails: yarn rw deploy serverless --stage prod --side api
Error:
[COMPLETED] Checking if Serverless framework is installed...
[STARTED] Building api...
❯ Generating Prisma Client...
✔ Generating Prisma Client...
❯ Verifying graphql schema...
✔ Verifying graphql schema...
❯ Building API...
✔ Building API...
[COMPLETED] Building api...
[STARTED] Packing Functions...
[FAILED] undefined is not a function
undefined is not a function
This is the function:
function nftPack() {
const filesToBePacked = (0, import_files.findApiDistFunctions)();
return Promise.all(filesToBePacked.map(exports.packageSingleFunction));
}
If you change the map function and remove the exports. so it just references the packageSingleFunction then it works.
How do we reproduce the bug?
yarn rw deploy serverless --stage prod --side api
What's your environment? (If it applies)
No response
Are you interested in working on this?
The text was updated successfully, but these errors were encountered: