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
Function runtime error: Cannot find module #11533
Comments
kodiakhq bot
pushed a commit
to vercel/nft
that referenced
this issue
May 10, 2024
`acorn-import-attributes` [did not support import assertions before](#377 (comment)), but now it does! This is important because `acorn` is failing to parse `runner.js` in [this issue](vercel/vercel#11533) due to an import assertion.
kodiakhq bot
pushed a commit
that referenced
this issue
May 10, 2024
[@vercel/nft@0.27.0](https://github.com/vercel/nft/releases/tag/0.27.0) is necessary for parsing import assertions. Import assertions are causing [this issue](#11533).
Can confirm it works with VERCEL_CLI_VERSION = vercel@34.2 set. |
@dglazkov v34.2 just shipped as the default, so you can remove this env var now. Thanks for the great description and repro! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Here's the minimal repro: https://github.com/dglazkov/vercel-test
<deployment url>/api/hello
.It gets a consistent "This Serverless Function has crashed." error. When I look into the runtime logs, I see that the the problem is described as follows:
When I look at the
node_modules
in the project, theremote.js
file is present:$ find node_modules | grep remote.js node_modules/@google-labs/breadboard/dist/src/remote.js node_modules/@google-labs/breadboard/dist/src/remote.js.map $
However, when I do a local
vercel build
, I can see that this file is not present in thenode_modules
of the function:It looks like it's getting dropped somehow? Not sure where. I gave the
@vercel/node
a quick spelunk and couldn't find anything that jumped out at me.The text was updated successfully, but these errors were encountered: