Build failed: function.js does not exist yarn berry #8259
Unanswered
prabhav-mehra
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi all, every since moving to yarn berry (3.6.4) I am facing issues with deploying functions.
Using
"firebase-tools": "^13.6.0" "firebase-admin": "12.0.0", "firebase-functions": "^3.13.1",
My entry point in package.json:
This exist and is created properly.
firebase.json
I didn't have to ignore these files initially but ever since moving to new yarn I have exclude these files else my package size is 160mb and it throws
Error: 400, <?xml version='1.0' encoding='UTF-8'?><Error><Code>EntityTooLarge</Code><Message>Your proposed upload is larger than the maximum object size specified in your Policy Document.</Message><Details>Content-length exceeds upper bound on range</Details></Error>
After excluding my package is 1.48kb but then it fails with
Build failed: function.js does not exist
.My entry point is pointing to the correct index.js file tho.
Added
"ls -l \"$RESOURCE_DIR/lib/functions/src\""
and can see the index.js filecmd: yarn firebase deploy --project default --non-interactive --force
when I try yarn serve
"serve": "$npm_execpath run build --watch & firebase emulators:start --only functions --project default"
I get an error and processes to start emulator.
functions: Failed to load function definition from source: FirebaseError: There was an error reading functions/package.json: functions/lib/functions/src/index.js does not exist, can't deploy Cloud Functions
Beta Was this translation helpful? Give feedback.
All reactions