Closed mostafa-tarek10 closed 5 months ago
It looks like it fails to read the options section of the file. See the limitation. When getOptionsFromCode
fails, it will still deploy. but any options you have added will not be included when deploying.
Can you show me the code after export default
?
@snorreks
Seems like my problem is with not providing options at all for all the functions
it was before
export default onWritten
getOptionsFromCode SyntaxError: Expected property name or '}' in JSON at position 3
at JSON.parse (
but at least I knew it looking for fields Expected property name or '}' I will try to give any options and try
still the same error btw i see cloud caching is working fine now ^^
Weird, can you show me the options section? There might be other limitations not mentioned in the readme
Weird, can you show me the options section? There might be other limitations not mentioned in the readme
I got many functions and I didn't specify any options just the empty object {} for all till now.
ok it's the callable functions causing this issue as I tried commenting them out and the error disappeared.
fixed.
@snorreks thanks for the updates ^^
sadly now I have this issue but the deployment working as usual I think it's cloud caching again.
getOptionsFromCode SyntaxError: Expected property name or '}' in JSON at position 3 at JSON.parse ()
at wt (/home/mostafa/Documents/Firebase-NX/node_modules/.pnpm/nx-cloud-functions-deployer@2.5.3_tsx@3.14.0/node_modules/nx-cloud-functions-deployer/executors/deploy/index.js:12:5728)
at Ue (/home/mostafa/Documents/Firebase-NX/node_modules/.pnpm/nx-cloud-functions-deployer@2.5.3_tsx@3.14.0/node_modules/nx-cloud-functions-deployer/executors/deploy/index.js:12:4845)
at async Promise.all (index 2)
at async qe (/home/mostafa/Documents/Firebase-NX/node_modules/.pnpm/nx-cloud-functions-deployer@2.5.3_tsx@3.14.0/node_modules/nx-cloud-functions-deployer/executors/deploy/index.js:12:7682)
at async Promise.all (index 0)
at async Mt (/home/mostafa/Documents/Firebase-NX/node_modules/.pnpm/nx-cloud-functions-deployer@2.5.3_tsx@3.14.0/node_modules/nx-cloud-functions-deployer/executors/deploy/index.js:30:3766)
at async promiseToIterator (/home/mostafa/Documents/Firebase-NX/nodemodules/.pnpm/nx@17.2.7@swc-node+register@1.6.8_@swc+core@1.3.101/node_modules/nx/src/command-line/run/run.js:30:11)
at async getLastValueFromAsyncIterableIterator (/home/mostafa/Documents/Firebase-NX/nodemodules/.pnpm/nx@17.2.7@swc-node+register@1.6.8_@swc+core@1.3.101/node_modules/nx/src/utils/async-iterator.js:13:19)
at async iteratorToProcessStatusCode (/home/mostafa/Documents/Firebase-NX/nodemodules/.pnpm/nx@17.2.7@swc-node+register@1.6.8_@swc+core@1.3.101/node_modules/nx/src/command-line/run/run.js:41:29)