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

npm install sagalbot/vue-select does not work #908

Closed
icithis opened this issue Jul 18, 2019 · 6 comments · Fixed by #980
Closed

npm install sagalbot/vue-select does not work #908

icithis opened this issue Jul 18, 2019 · 6 comments · Fixed by #980

Comments

@icithis
Copy link

icithis commented Jul 18, 2019

Running import vSelect from 'vue-select' off of a npm install sagalbot/vue-select results in the following.

 ERROR  Failed to compile with 1 errors                                                                                                                                             6:41:25 PM

This dependency was not found:

* vue-select in ./src/main.js

This does not happen when installing off of vue-select.

This is quite inconvenient, as it is difficult to fork solutions to esoteric problems due to this issue.

I took the time to do a simple npm install of both vue-select and sagalbot/vue-select, both version 3.1.0. foo is from npm, bar is from github.

Only in foo/node_modules/vue-select: dist
Only in bar/node_modules/vue-select/docs/.vuepress/components: ValidationRequired.vue
Files foo/node_modules/vue-select/docs/.vuepress/config.js and bar/node_modules/vue-select/docs/.vuepress/config.js differ
Only in foo/node_modules/vue-select/docs/.vuepress: public
Files foo/node_modules/vue-select/docs/guide/components.md and bar/node_modules/vue-select/docs/guide/components.md differ
Files foo/node_modules/vue-select/docs/guide/css.md and bar/node_modules/vue-select/docs/guide/css.md differ
Only in bar/node_modules/vue-select/docs/guide: validation.md
Only in bar/node_modules/vue-select/docs: package.json
Only in bar/node_modules/vue-select/docs: yarn.lock
Files foo/node_modules/vue-select/netlify.toml and bar/node_modules/vue-select/netlify.toml differ
Files foo/node_modules/vue-select/package.json and bar/node_modules/vue-select/package.json differ
Files foo/node_modules/vue-select/yarn.lock and bar/node_modules/vue-select/yarn.lock differ
Files foo/package-lock.json and bar/package-lock.json differ

This seems odd, considering the versions and installation method infer there should be no differences.

@doits
Copy link
Contributor

doits commented Aug 7, 2019

Refs #909. I think the dist folder is only uploaded to the repository and that's why it doesn't work to install it directly from github. Not sure if this is a bad practice or how other libraries do it.

@sagalbot
Copy link
Owner

I ignored the dist folder from source control a few releases back. Almost every PR was coming in with the dist compiled, which was resulting in conflicts. Is there a specific reason you need the repository version?

@doits
Copy link
Contributor

doits commented Aug 27, 2019

Welcome back! :-)

Is there a specific reason you need the repository version?

It makes it possible to simply use latest version from master (or whatever branch) directly from github. So you can test changes directly in your project by simply pointing it to the correct github branch like this (for example what I did in #921):

  "dependencies": {
    "vue-select": "https://github.com/doits/vue-select.git#fix_initial_label_on_ajax_options_built",
  }

@icithis
Copy link
Author

icithis commented Aug 27, 2019

My intention is to quickly implement pull requests which are forks via npm. In this case, #895 was what I was looking to install.

@sagalbot
Copy link
Owner

Thanks @doits! Going to start getting my brain back in action this week. Seems like I should just bring back the dist folder!

@sagalbot
Copy link
Owner

sagalbot commented Nov 6, 2019

#980 adds an npm prepare script to the package – this will get run before I publish a new release, and whenever you install from GitHub.

The only caveat is that this will not work with yarn. The package must be installed via NPM for the dist to be built. I think this is probably the best of both worlds – I don't have to deal with conflicts in PRs, and you can install from source (if you're using NPM).

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

Successfully merging a pull request may close this issue.

3 participants