Skip to content
This repository was archived by the owner on May 8, 2025. It is now read-only.

[Bug Report] Installation fails when src directory is not found #39

Closed
Uninen opened this issue Sep 18, 2018 · 9 comments
Closed

[Bug Report] Installation fails when src directory is not found #39

Uninen opened this issue Sep 18, 2018 · 9 comments
Assignees
Labels
enhancement New feature or request wontfix This will not be worked on

Comments

@Uninen
Copy link

Uninen commented Sep 18, 2018

Versions and Environment

Vuetify: 1.0.19
Vue: 2.5.17
Browsers: Chrome 69.0.3497.92
OS: Mac OS 10.13.5

Steps to reproduce

I tried to install Vuetify in a project where the 'src' directory has been renamed to 'vue' and the installation fails when running completion hooks: "Error: ENOENT: no such file or directory, open '/code/src/main.js'"

Expected Behavior

I'm not sure if it's reasonable to expect people to move things around, but at least the installer could just fail gracefully and either ask for the new directory name or just say that "didn't find src directory in default place, skipped writing of pre-made templates".

Actual Behavior

Error: ENOENT: no such file or directory, open '/code/src/main.js'

Reproduction Link

https://codesandbox.io/s/z21zlv53jx

@jacekkarczmarczyk jacekkarczmarczyk added the enhancement New feature or request label Sep 18, 2018
@eder-toledo
Copy link

My error has a relationship?

Versions and Environment

babel/polyfill: 7.0.0-rc.1
vue: 2.5.17
vuetify: 1.2.0
OS: Windows 10

Steps to reproduce

Quick start: https://vuetifyjs.com/en/getting-started/quick-start
in the step: npm run serve

Actual Behavior

Error: Failed to compile with 1 errors
imagen

@jacekkarczmarczyk
Copy link
Member

@eder-toledo not enough information in your comment to say anything about your issue - i don't know what did you do before running serve, i don't see what error is thrown. Please create a separate issue with proper reproduction

@jacekkarczmarczyk
Copy link
Member

@Uninen can you reproduce your issue with 0.2.0 version of vuetify plugin? I think it could handle the entry file properly, the problem with the location of components may still exist though

@Uninen
Copy link
Author

Uninen commented Sep 20, 2018

My reported versions were wrong as I either read them wrong or vue-cli does some magic with package.json; used most recent versions (as of couple of days ago) of everything.

I created a clean project to reproduce this ( https://gitlab.com/uninen/vuetify-cli-bug ) and the installer didn't fail but instead wrote everything in src directory (it may have failed in my other project because I have src dir there for other stuff). I think this is semi-OK as it can't know better. I only opened this ticket because the installer crashed and this seems not to be the case; feel free to close this ticket.

@jacekkarczmarczyk
Copy link
Member

The plugin was updated just after you've reported the issue, and in 0.2.0 we've improved the way of resolving the entry file.
I think it will be safe to save the template files in the same folder as the entry file instead of fixed /src

@Uninen
Copy link
Author

Uninen commented Sep 20, 2018

Hmm. with the repo above (where entry file points to vue/main.js) this 0.2.0 plugin still wrote the templates in src folder. (I added each step as separate commits, should be easy enough to repro.)

But yes, it's a fair assumption to write them in the same folder as the entry file.

@jacekkarczmarczyk
Copy link
Member

Only resolving of the entry file has been fixed, templates are still being saved in the src, this needs to be fixed as well, that's why I'm not closing the issue

@jacekkarczmarczyk jacekkarczmarczyk self-assigned this Sep 20, 2018
@jacekkarczmarczyk
Copy link
Member

@Uninen I didn't look into your repro before, but I can see now that you're using vue cli 2.X in you project. In 3.0 changing the src folder is not so easy: vuejs/vue-cli#1134 (comment) (and previous comments), and atm I'm not sure if we want to support 2.X

@Uninen
Copy link
Author

Uninen commented Sep 21, 2018

The proper repro project is here, it's done with the latest cli v3: https://gitlab.com/uninen/vuetify-cli-bug

Everything else in the project works ok, but hadn't seen that "you're on your own" comment before -- this is clearly not documented. But feel free to close this ticket if it's out of scope (not officially supported by vue-cli) anyways.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

3 participants