Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Everything is undefined #3

Closed
ShafSpecs opened this issue Apr 16, 2024 · 3 comments
Closed

Everything is undefined #3

ShafSpecs opened this issue Apr 16, 2024 · 3 comments

Comments

@ShafSpecs
Copy link

ShafSpecs commented Apr 16, 2024

Hello 馃憢, using this is an electron file. I get error that a particular constructor is undefined. Logging that particular namespace yielded a lot of undefined objects:

[Module: null prototype] {
  AltitudeReferenceSystem: undefined,
  CivicAddress: undefined,
  GeoboundingBox: undefined,
  Geocircle: undefined,
  Geocoordinate: undefined,
  GeocoordinateSatelliteData: undefined,
  GeolocationAccessStatus: undefined,
  Geolocator: undefined,
  // ...
}

I am using electron v30, and the *.node files seem in order. I am not sure whether I was meant to do something first or I am just doing it wrong

@xan105
Copy link
Owner

xan105 commented Apr 17, 2024

As stated in the readme some namespace export might be undefined due to missing corresponding .node nodert file (compilation failure, etc).

Could you tell me which WinRT namespace we are talking about here? This might also be an error on my end. I'll go check. Most is auto or semi auto generated due to the amount of namespace, errors are possible.

NB: Also did you install the electron targeted build ?
npm i @xan105/nodert --electron
cf: https://github.com/xan105/node-nodeRT?tab=readme-ov-file#electron

@ShafSpecs
Copy link
Author

I did not add the electron flag, would confirm if that's the issue atm. But I used the npm_config variable. I am using windows.devices.geolocation

I would test it with electron flag now and get back to you. Thank you :)

@ShafSpecs
Copy link
Author

ShafSpecs commented Apr 17, 2024

Looks like that caused the undefined thingy, the prebuilds folder had node prebuilds. Deleting it and re-installing with the flag, fixed it. Thank you 馃槃!

I think the part about adding the flag should be more explicit, I thought it was one of the two: _nodert in package.json or flag

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants