Reputation: 9013
I have a git repo for an Ember Addon:
It passes all unit tests. It has been published to npm as ui-responsive-toolbelt. I have used npm's "link" functionality to test locally that this "addon" (in Ember parlance) works fine in consuming application when included in the package.json
file as a dependency.
Surprisingly, and I'm completely flummoxed on this, when npm installs this dependency into an Ember project directory it brings across a vast majority of the files without complaining. From NPM's perspective it appears to be a clean install. Unfortunately an addon depends heavily on it's "entry point" which is the index.js
in the root directory of the repo. I have very clearly included this file in the repo but for some reason it is not being brough over!
I have tried this on two computers and three Ember projects and all have the same outcome. Please help!
the error message I get from Ember-CLI when I try to start the server with ember serve
is:
The package
ui-responsive-toolbelt
is not a properly formatted package, we have used a fallback lookup to resolve it at/path/to/project/node_modules/ui-responsive-toolbelt
. This is generally caused by an addon not having amain
entry point (orindex.js
).
This message is repeated twice and then I get:
The
ui-responsive-toolbelt
addon could not be found at/path/to/project/node_modules/ui-list/node_modules/ui-responsive-toolbelt
.
Upvotes: 0
Views: 102
Reputation: 14963
npm install ui-responsive-toolbelt
does not download the index fileSo the problem is that npm publish
is not working properly. There is a bug filled for that. https://github.com/npm/npm/issues/5082
What you can do is publish again your addon using a recent npm version (or play with older versions) until you see that the index file is added too.
Upvotes: 1