Closed debuggerpk closed 6 years ago
just verified, the firebase admin works fine with nestjs and electron, its only this package.
The best way to load the Firebase certificate is with the Webpack JSON Loader. It is kind of dirty to hack it with TypeScript.
Also make sure firebase-admin
is a DEPENDENCY rather than devDependency in your package.json
. You shouldn't need special environment variables to build the native dependencies. Just run npm run install-app-deps
and this should automatically build everything for your current platform and Electron version. (And this is also run automatically after you NPM install.)
@colinskow yep, did read the README, however grpc prebuilt binary is not available for electron version in this repo, thus had to build that package from source.
having said that, i think the error
ERROR in [at-loader]
is with awesome-typescript-loader and type checking. will verify it by disabling type checking for webpack configuration for electron.
PS: it is a non blocking error during development, because after throwing the error, firebase responds. however, during the build process, the build process exits.
yep, doing
{
"transpileOnly": true
}
takes care of the errors. Thanks for this awesome loader btw. Will work to have three tssconfig.json files.
Note: for support questions, please use one of these channels: Chat: AngularClass.slack or Twitter: @AngularClass
I'm submitting a ... [x] bug report [ ] feature request [ ] question about the decisions made in the repository
Do you want to request a feature or report a bug?
I believe this is a bug
This is a bug report, i believe webpack build for main.electron.ts does not loads json files properly.
I am trying to run the firebase-admin inside electron (not the web part). When it do
the firebase-admin is running fine, but along the way, it throws an error first.
As you can see, i have rename the certificate file from a ".json" to ".ts", and modified the certificate file to have
it is because json does not loads propely, something to do with tsconfig or webpack config?.
PS: To make it run alright, i had to add this to my environment settings before installing packages, to make the binaries build them from source.
PPS: for everybody else, please note that you must have python2 available when building packages. If you have python3 as default, just make sure path to python2 is in your path.
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via https://plnkr.co or similar (you can use this template as a starting point: http://plnkr.co/edit/tpl:AvJOMERrnz94ekVua0u5).
What is the expected behavior?
What is the motivation / use case for changing the behavior?
Please tell us about your environment:
Angular version: 2.0.0-beta.X
Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]
Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, gitter, etc)