3

This is probably because of my minor knowledge on terminal commands and filesystem on Mac OS but I have a really hard time to install a vuejs project.

First I tried to install with WebStorm 2018.1 and with the template for vue projects. I got on error pointing to permission problems.

After that I tried to install with vue init webpack (and sudo -i -u xxx vue init webpack) but got the error - Failed to download repo vuejs-templates/webpack: EPERM: operation not permitted, utime

After that I tried to install with sudo vue init webpack which installed all the files but with root user and I cant edit the files when I am logged in as a user (admin), the files are read only.

Thanks for any help.

3
  • how did you install node.js/vue-cli and what version do you have? Run node -v npm -v vue -V. Commented Apr 3, 2018 at 18:52
  • 2
    Given that your first impulse was to sudo stuff, I'd bet you've previously attempted this "fix" for other issues and borked permissions all over. It should usually give you a file location that it failed on - you'll need to fix its perms. Commented Apr 3, 2018 at 18:57
  • ceejayoz you are probably right. I tried to rerun npm install --global vue-cli and got EACCES: permission denied, access '/usr/local/lib/node_modules/vue-cli/node_modules/cli-spinners' and npm ERR! Please try running this command again as root/Administrator. And probably I used sudo because I earlier used sudo for node so I am stuck and I probably dont have the knowledge to uninstal everything (node, npm, vue-cli) and if I had. Maybe the OS will order me to use sudo anyway. Commented Apr 3, 2018 at 19:49

3 Answers 3

4

Please follow these commands:

To install the Vue CLI globally on your local system:

npm install -g vue-cli

To initiate a project

vue init webpack vueapp01

cd vueapp01

Start installing the dependencies by using npm again:

npm install

After having completed the installation of packages you can start the web server in development mode by using npm in the following way:

npm run dev

This will start the server on port 8080 and the application output is displayed in the browser automatically.

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks for your answer. But when I run vue init webpack vueapp01 i got error - vue-cli · Failed to download repo vuejs-templates/webpack: EPERM: operation not permitted, utime '/Users/xxx/.vue-templates/webpack/.circleci'
Is npm install -g vue-cli successfully executed before you run vue init webpack vueapp01
2

I am not sure why but it works.

I removed the hidden folder vue-templates (under my user account)

Installed the cli again with sudo npm install -g vue-cli. I thought that I should have problem again because I used sudo, but not.

And then I was able to use vue init webpack voutest without sudo an all the files was editable and not readonly as before.

I also updated npm to 5.8.0

Comments

0

I had the same issue. In my case, the node version was 8.0. I upgraded to 10.0 and it worked.

  1. I removed all the node modules.
  2. Removed node 8.x and npm.
  3. Installed node 10.x and npm
  4. Install @vue/cli using the npm.

1 Comment

I am using node 10.14 and npm 6.4 .. but still I am not able to move further and setup is stuck at project description .

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.