external files not loaded #2817
Unanswered
dannygueta
asked this question in
Q&A
Replies: 2 comments 1 reply
-
It appears that you're encountering an issue when trying to access the 'datamodel.graphql' file within your Fission function. The error message indicates that the file is not found, even though it exists in the package.
|
Beta Was this translation helpful? Give feedback.
1 reply
-
Directly reference the absolute path to 'datamodel.graphql' within '/userfunc/'. const fs = require('fs'); |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
i'm trying to setup my first fission project, migrating a NodeJS AWS Lambda to Fission, i've built a package (zip) containing the following files
/main.js
/src/graphql/datamodel.graphql
the function itself runs but it fails to load /src/graphql/datamodel.graphql even though the file is clearly in the zip.
"level":"error","time":1688651708071,"pid":18,"hostname":"poolmgr-nodejs-default-25602273-66d7bf4d8f-l8wbv","version":"1.0.2","functionName":"prepareFirstBill","message":"user code load error: Error: ENOENT: no such file or directory, open './src/graphql/datamodel.graphql'"
i've downloaded the package using 'fission package getdeploy' and i can clearly see the zip file containing all of my source code yet during runtime it says the file is missing...
any help / lead ?
Beta Was this translation helpful? Give feedback.
All reactions