-
-
Notifications
You must be signed in to change notification settings - Fork 84
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
No valid exports main found for 'C:\ha-lib\node_modules\home-assistant-js-websocket' #113
Comments
I just downgraded node using nvm to 11.14.0 and the error disappeared 🤔 so it must be something with latest nodejs. |
We are leveraging the new home-assistant-js-websocket/package.json Lines 11 to 14 in ad3b2b8
For runtimes that can resolve All others are pointing at a build in UMD format so supports module.exports, require etc and can be found here https://unpkg.com/browse/[email protected]/dist/haws.umd.js From your stack trace it looks like it is using the commonjs importer for our package. Can you try the following with Node 13: open your |
I'm not sure what I have changed over the weekend when working with NodeJS 11 but I reinstalled NodeJS 13 (13.12.0 this time as opposed to 13.8.0) again and I am getting the following error:
Removing Quick google search tells me this:
Changing the |
Something interesting: removing the "export" property altogether from your package.json fixes the error in Node 11, 12 and 13. |
I am trying to integrate this client into my NodeJS library but I am having the following issue when compiling and running my (currently very simple) app.
Repo can be found here: https://github.com/ciesielskico/home-assistant-rxjs
FIrst things first:
The createSocket function is taken from the link in your example for NodeJS applications.
I have googled the error message but to my surprise could find only a handful of posts matching that exact error related to some problems with
merge-anything
package.I'm pretty sure I'm doing something wrong but I just cannot see what it is, maybe you guys will?
The text was updated successfully, but these errors were encountered: