-
Notifications
You must be signed in to change notification settings - Fork 7
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
Deployment error. Function load error #35
Comments
I was trying to use Pring with cloud function when this error occurred. Everything built fine and lint ran well. |
Thanks. I fixed.
for example. import * as functions from 'firebase-functions';
import * as Pring from "pring"
const admin = Pring.Admin
admin.initializeApp()
const app = admin.app()
Pring.initialize(app.firestore(), admin.firestore.FieldValue.serverTimestamp())
import { User } from "./user"
export const userSave = functions.https.onRequest(async (request, response) => {
const user: User = new User()
await user.save()
}); |
How can I guarantee that the version of |
This time firebase-admin now includes In the future we will change to implementation that does not depend on firebase-admin. |
@jerryOkafor I released 0.23.0 not dependent on Admin. |
Ok, I will check that, but it pointed to the |
It is still happening even after upgrading to the latest version. |
@jerryOkafor I create |
I am trying to deploy my cloud function after updating pring and this is wha I get.
Pring version : 0.22.0
Function load error: Code in file lib/index.js can't be loaded.
Is there a syntax error in your code?
Detailed stack trace: /user_code/node_modules/pring/lib/batch.js:110
async commit() {
^^^^^^
SyntaxError: Unexpected identifier
at createScript (vm.js:56:10)
at Object.runInThisContext (vm.js:97:10)
at Module._compile (module.js:549:28)
at Object.Module._extensions..js (module.js:586:10)
at Module.load (module.js:494:32)
at tryModuleLoad (module.js:453:12)
at Function.Module._load (module.js:445:3)
at Module.require (module.js:504:17)
at require (internal/module.js:20:19)
at Object. (/user_code/node_modules/pring/lib/index.js:4:17)
The text was updated successfully, but these errors were encountered: