Vue-cli: Yorkie installation fails which causes Vue CLI to fail

Created on 1 Dec 2018  ·  10Comments  ·  Source: vuejs/vue-cli

Version

3.2.1

Environment info

Environment Info:

  System:
    OS: Linux 4.9 Debian GNU/Linux 9 (stretch) 9 (stretch)
    CPU: (4) x64 Intel(R) Core(TM) i5-8600K CPU @ 3.60GHz
  Binaries:
    Node: 11.3.0 - /usr/local/bin/node
    Yarn: 1.12.3 - /usr/local/bin/yarn
    npm: 6.4.1 - /usr/local/bin/npm
  Browsers:
    Chrome: Not Found
    Firefox: Not Found
  npmGlobalPackages:
    @vue/cli: 3.2.1

Steps to reproduce

vue create myapp

choose "default" setup

(Also tried the manual setup, which doesn't work either...)

What is expected?

Vue installs successfully

What is actually happening?

[email protected] install /data/denni/Documents/git/cateroo-frontend/what/node_modules/yorkie
node bin/install.js

fs.js:122
throw err;
^

Error: EINVAL: invalid argument, open '/data/denni/Documents/git/cateroo-frontend/what/node_modules/yorkie/package.json'

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: node bin/install.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

Comments

I tried to install yorkie with npm install yorkie. That fails with the same error message, so it seems it is a problem with yorkie. Why is Vue depending on this? Yorkie doesn't even have an issues tab on GitHub. Is Vue just using latest available version of dependencies? Seems like a great cause for failure.

Most helpful comment

This error ([email protected]) is related to the security attributes of the project-vuejs folder. So, create your projects outside the root / folder, make Linux updates (Ubuntu ...) and success to everyone!

All 10 comments

@dentych

Why was this closed?
Did you find a solution?

@ginomempin Hey there! As far as I remember, I was trying to run VueCLI in a Docker container running either Alpine or Ubuntu (most likely I was using Alpine, but can't remember for certain). I tried installing Node on my system instead, without using Docker, and it seemed to work.

I tried installing Node on my system instead, without using Docker, and it seemed to work.

You mean you installed it globally?

I got the same error as yours and it is still not working for me, though.
I'm not sure if it's a similar env, but I used a Linux aarch64.
In case you are interested, I created a new ticket at #3466.

You mean you installed it globally?

I mean, instead of installing Node inside a Linux Docker container, I installed it on the Windows host (the system that was running Docker). It seemed to work.

The architecture I used in the Docker container was Linux amd64

I will keep an eye on the issue you created, to see if a fix will be found. :)

I am facing the same issue trying to run vue-cli inside a container if I let vue create use npm; it works with yarn, though. I could confirm that npm install [email protected] fails, while yarn add [email protected] works. If relevant, I am not working as root in the container, but as a simple user.

The same error occurs using node:10.15.1-slim (note the -slim) while node:10.15.1 does not.

Solved issue by using latest node image for container FROM node:latest

I was facing the same error while trying to create a Vue project from inside a Docker container. My Dockerfile was as follow:

FROM node:lts-alpine

# Working directory and mount volume
ARG PROJECT_DIR=/srv/app
RUN mkdir -p $PROJECT_DIR
WORKDIR $PROJECT_DIR
VOLUME $PROJECT_DIR

# Install Vue CLI
RUN npm install -g @vue/cli

I build the Docker image and connect to the Docker container with these commands:

$ docker build -t vue-app-setup:latest .
$ docker run -it --rm -v "C:\my_path\vue-app-setup:/srv/app" vue-app-setup sh

In the Docker container, I run vue create my_project.
I got the error message:

Failed at the [email protected] install script

Same as @stepansib, I solved my issue with FROM node:latest instead of FROM node:lts-alpine in my Dockerfile.

  • Node version: 12.4.0
  • Vue CLI version: 3.8.2

No idea why it's closed if it is still failing on Docker

This error ([email protected]) is related to the security attributes of the project-vuejs folder. So, create your projects outside the root / folder, make Linux updates (Ubuntu ...) and success to everyone!

Was this page helpful?
0 / 5 - 0 ratings