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

ENOENT: no such file or directory upon project initialisation #668

Open
JonasTheGamer opened this issue Apr 16, 2021 · 5 comments
Open

ENOENT: no such file or directory upon project initialisation #668

JonasTheGamer opened this issue Apr 16, 2021 · 5 comments

Comments

@JonasTheGamer
Copy link

Describe the bug
Hi, I was following this tutorial:
https://www.sitepoint.com/build-vue-chrome-extension/

This section assumes that you have Node and npm installed on your computer. If this isn’t the case, you can either head to the project’s home page and grab the relevant binaries for your system, or you can use a version manager. I would recommend using a version manager.

I have node v12.14.1 and npm v6.13.4 installed. I'm on a windows 10 machine.

The next steps are to run the following commands to install everything that is needed:
npm install -g @vue/cli npm install -g @vue/cli-init

Great! That's done, now I need to initialize my project.

vue init kocal/vue-web-extension new-tab-page

That returns this error:

image

I tried rebooting, same result. I tried moving all contents from your template folder into another folder called "template" so it would find it but when running that command again it just put everything back to normal and guess what? Gave the error..

How would I resolve this issue? Thanks in advance for your reply.

@Kocal
Copy link
Owner

Kocal commented Apr 17, 2021

Hi!

I think you problem comes from npm install -g @vue/cli-init which is only needed for pulling old template for Vue-CLI 2.x (see https://cli.vuejs.org/guide/creating-a-project.html#pulling-2-x-templates-legacy).

This project is for Vue-CLI 3+, so you don't need to intall @vue/cli-init.

I think you can make things working by running

$ npm uninstall -g @vue/cli @vue/cli-init
$ npm install -g @vue/cli
$ vue create --preset kocal/vue-web-extension my-extension

@JonasTheGamer
Copy link
Author

Hi! Thanks for the quick reply. What would the difference be with your last command and vue init kocal/vue-web-extension new-tab-page ? In the tutorials that's the command they use, and if possible I'd like to use that one to be able to follow up closely with the tutorial to learn first before doing. :)

Also, I tried running the secon command (npm install -g @vue-cli) but received this error:
image

@Kocal
Copy link
Owner

Kocal commented Apr 18, 2021

Also, I tried running the secon command (npm install -g @vue-cli) but received this error:

Yeah sorry, I've made a typo, you should run npm install -g @vue/cli

@JonasTheGamer
Copy link
Author

Thank you for the quick reply! Sorry for not following up sooner, didn't have the time to do so...

I managed to execute the commands you listed and asked ESLINT to only prevent errors (it makes me rage anyway) and here we go , it's already complaining..
image

Any idea how I can resolve this? I didn't do anything in the folder yet, just ran these commands. My folder looks like this now:
image

@JonasTheGamer
Copy link
Author

JonasTheGamer commented May 21, 2021

image

Managed to run it, already getting errors without modifying any files.. I'm closing this issue, feel free to re-open if you'd like to continue but I think I just gave up..

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

2 participants