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

How does one pull from git rather than npm (for latests code) #213

Open
LMS007 opened this issue Sep 27, 2017 · 8 comments
Open

How does one pull from git rather than npm (for latests code) #213

LMS007 opened this issue Sep 27, 2017 · 8 comments

Comments

@LMS007
Copy link

LMS007 commented Sep 27, 2017

Sorry, dumb question but when using a github URL (rather than direct from npm), the package seems to not install the same, or at least the /lib folder is missing. Is there some build steps that need to be done? I would like to use version 0.7.x off master branch.

@clschnei
Copy link
Contributor

@LMS007 The issue is with the node version, I believe. I ran into the same issue while trying to make a PR a couple weeks ago. Can you remind me what error you're seeing?

@LMS007
Copy link
Author

LMS007 commented Sep 28, 2017

I'm on

npm 5.4.2
nodejs 6.11

A little background, I'm using browserify to wrap up my files and it does indeed work with the official npm elemental-ui version but not github.

      throw er; // Unhandled 'error' event
      ^

Error: Cannot find module 'elemental' from ' ...<my local file path>

This is the line of code that creates the errror

import { Modal, ModalBody, ModalHeader, ModalFooter } from 'elemental'

The entire lib/ is missing from version 0.7.0 off github

@clschnei
Copy link
Contributor

clschnei commented Sep 28, 2017

Was there any error during npm install?

edit: Are you using npm to install it, or just cloning the repo?

@LMS007
Copy link
Author

LMS007 commented Sep 28, 2017

Nope, installed without issue

$ npm update elemental
+ [email protected]
updated 1 package in 6.692s

@jduthon
Copy link
Contributor

jduthon commented Oct 5, 2017

It is normal as the lib folder, which is the built files, is not updated on github compared to the actual npm package.
We could create a postinstall script which check if we have already the /lib folder, and if it doesn't exist run a build to overcome this problem.
Not sure if there is any reason to go against this?
I can do a PR for this.

@LMS007
Copy link
Author

LMS007 commented Oct 5, 2017

We would also need to update the lib folder if its old e.g. if you had a lib folder before and then pulled from master again... there could be outdated files

@jduthon
Copy link
Contributor

jduthon commented Oct 5, 2017

Well I think I recall npm when used with github repo is anyways by default not updating them except if you force it to do so?
So if you want to update the package you need I think to do a npm install elemental.
In this case the elemental folder will be replaced so the lib folder should be removed.

@LMS007
Copy link
Author

LMS007 commented Oct 5, 2017

good point

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

3 participants