-
Notifications
You must be signed in to change notification settings - Fork 100
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
library is incorrectly packaged for npm #136
Comments
Just FYI, I repackaged the library in my local mode_modules, and ended up changing two lines in package.json as so:
|
Thanks, I’ll take a look at this on Monday and try to get the next release working as expected with a new release on npm 👍 |
Hi @durera , news on this topic? |
Sorry, various other things took me away from SDK work. I'm using today to try to catch up on some of the outstanding issues across the SDKs, including this one. |
Re-opened because issue was closed automatically from the commit & I want to keep this open until after a new release is available on NPM and has been verified packaged correctly |
I have published v0.6.1 with these changes in place ... https://www.npmjs.com/package/@wiotp/sdk/v/0.6.1 Please let me know if this works for you/if any further changes are needed 👍 |
Hi @durera , the package not work because the I create a PR to add I don't know how you manage the Thanks |
Ah, I hadn't noticed that files list in package.json, was only looking at /npmignore :) 0.6.2 looks like it has everything now. I've pulled it down via the sample app (https://github.com/ibm-watson-iot/iot-nodejs/tree/master/samples/webpack/statusconsole) and can see the dist folder, and it all works in the context of a webpack app at least. |
hi @durera , now for me work perfect on nodejs >= 6.10 and ES2015. Thanks |
By default, nodejs currently does not support ES6 syntax such as export, and packages that are published via npm need to transpile themselves using Babel as part of the packaging process, otherwise the library is unusable out of the box.
The current release of the library will work fine in most browsers, but fails as an npm package, making it really difficult to use for any sort of enterprise application where connections are managed by a server.
This is quite a nice guide on packaging a library for npm: https://medium.com/@TeeFouad/a-simple-guide-to-publishing-an-npm-package-506dd7f3c47a
The text was updated successfully, but these errors were encountered: