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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running in NW.js enviroment failed #30

Open
commyfriend opened this issue May 5, 2022 · 1 comment
Open

Running in NW.js enviroment failed #30

commyfriend opened this issue May 5, 2022 · 1 comment

Comments

@commyfriend
Copy link

image

When dart-sass is run in the nw.js environment, it failed, and it looks like we need to make a special check for nw.js, just like electron

https://github.com/mbullington/node_preamble.dart/blob/master/lib/preamble.js#L50

process.versions.hasOwnProperty('nw')
@corwin-of-amber
Copy link

corwin-of-amber commented Nov 8, 2022

I have been having this issue for a long time and I'm using this horrible monkey patch:

if (typeof process !== 'undefined' && process.versions['nw'])
    process.versions['electron'] = 'FAKE (hack for node_preamble.dart)';

It should be a simple fix of adding nw to the condition. Are PRs considered here?

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