Install with "npm install gitlab:repo/name" doesn't work
lioshi opened this issue · 6 comments
There is only files
- package.json
- readme.md
- licence
no .js
Install localy works... https://github.com/HarveyD/react-component-library#installing-component-library-locally
An idea?
Hi Lioshi,
Make sure you've built your project before publishing it: npm run build && npm publish
.
Also make sure your package.json
files
entry has the directory that contains your compiled files: https://github.com/HarveyD/react-component-library/blob/master/package.json#L7
Cheers.
Thanks.
As a solution I have added "prepare" script
"scripts": {
"prepare": "npm run build",
"prepublishOnly": "npm run build"
should do this. https://docs.npmjs.com/misc/scripts
Yes only when publish on NPM registry, but I use a gitlab repo and install (your great job) react-component-library with npm i "git+https://gitlab.com/name/react-component-library.git"
Right, you'll need to remove build
from .gitignore
and commit the contents of the build
folder then I imagine. I'll add instructions in the README
I've included instructions on how to do this in the README
. Hope it helps!