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

Cannot install @vue/cli-service on Linux aarch64 because "Failed at the yorkie@2.0.0 install script." #3466

Closed
ginomempin opened this issue Feb 18, 2019 · 11 comments

Comments

@ginomempin
Copy link

Version

3.4.0

Environment info

OS: Linux 4.14.0-xilinx-v2018.2 aarch64 / arm64
User: root
Node: 10.15.1 (installed at /usr/bin/node)
npm: 6.4.1 (installed at /usr/bin/npm)

Steps to reproduce

From the command line, just do npm install @vue/cli-service.

What is expected?

The installation of @vue/cli-service is successful.

What is actually happening?

The installation fails with the following error message:

> yorkie@2.0.0 install /home/root/apps/config-manager/out/webapp/frontend/node_modules/yorkie
> node bin/install.js

internal/modules/cjs/loader.js:583
    throw err;
    ^

Error: Cannot find module '/home/root/apps/config-manager/out/webapp/frontend/node_modules/yorkie/bin/install.js'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
    at Function.Module._load (internal/modules/cjs/loader.js:507:25)
    at Function.Module.runMain (internal/modules/cjs/loader.js:742:12)
    at startup (internal/bootstrap/node.js:283:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:743:3)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.7 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.7: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm64"})

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

When inspecting the NPM debug logs:

22191 verbose stack Error: yorkie@2.0.0 install: `node bin/install.js`
22191 verbose stack Exit status 1
22191 verbose stack     at EventEmitter.<anonymous> (/usr/local/lib/nodejs/node-v10.15.1-linux-arm64/lib/node_modules/np
m/node_modules/npm-lifecycle/index.js:301:16)
22191 verbose stack     at EventEmitter.emit (events.js:189:13)
22191 verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/nodejs/node-v10.15.1-linux-arm64/lib/node_modules/np
m/node_modules/npm-lifecycle/lib/spawn.js:55:14)
22191 verbose stack     at ChildProcess.emit (events.js:189:13)
22191 verbose stack     at maybeClose (internal/child_process.js:970:16)
22191 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
22192 verbose pkgid yorkie@2.0.0
22193 verbose cwd /home/root/apps/config-manager/out/webapp/frontend
22194 verbose Linux 4.14.0-xilinx-v2018.2
22195 verbose argv "/usr/local/lib/nodejs/node-v10.15.1-linux-arm64/bin/node" "/usr/bin/npm" "install" "@vue/cli-service
"
22196 verbose node v10.15.1
22197 verbose npm  v6.4.1
22198 error code ELIFECYCLE
22199 error errno 1
22200 error yorkie@2.0.0 install: `node bin/install.js`
22200 error Exit status 1
22201 error Failed at the yorkie@2.0.0 install script.

The same error is encountered when doing:

  • npm install @vue/cli
  • npm install yorkie
@ginomempin
Copy link
Author

ginomempin commented Feb 18, 2019

I know that there is a similar issue posted at #3056 ("Yorkie installation fails which causes Vue CLI to fail") but that was closed without any comments or solution, so I posted a new one here as indicated at https://new-issue.vuejs.org/?repo=vuejs/vue-cli ("open a new issue using the form below instead of commenting on the old issue").

@caugner
Copy link
Contributor

caugner commented Feb 18, 2019

Have you tried installing vue-cli globally as described here:

npm install -g @vue/cli
# OR
yarn global add @vue/cli

@ginomempin
Copy link
Author

@caugner

I got the same error when I installed @vue/cli and @vue/cli-service globally.

@ginomempin
Copy link
Author

ginomempin commented Feb 19, 2019

I did some more testing:

I got it to install successfully when I downgraded my env's node version to v8.4.0.
(It's the base node package that comes with the OS.)
But Vue CLI will not run on this lower version:

You are using Node v8.4.0, but this version of vue-cli requires Node >=8.9.
Please upgrade your Node version.

This is mentioned in the Vue Installation docs, where it says "Vue CLI requires Node.js version 8.9 or above (8.11.0+ recommended).". But if I upgrade node, I'll get the same installation errors as I previously reported.

I'm not familiar with what's inside Vue CLI or with yorkie, but it seems I'm unable to use it on this env.

@sodatea
Copy link
Member

sodatea commented Feb 19, 2019

What about npm install @vue/cli-service --unsafe-perm?

@sodatea
Copy link
Member

sodatea commented Feb 19, 2019

For security reasons, if you run npm install as root, npm will set the user to "nobody" when running postinstall scripts, which does not have access to the project directory, thus the error message.

@ginomempin
Copy link
Author

Thanks for the tip @sodatea.
It looks like I got it to install successfully now.

  1. I started off with the base node version v8.4.0.
  2. I then updated to the ARMv8 version of node v10.15.1
  3. npm install @vue/cli --unsafe-perm (also works with -g)
  4. npm install @vue/cli-service --unsafe-perm (also works with -g)

@stepansib
Copy link

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

@Cebape
Copy link

Cebape commented Apr 2, 2020

This error (Yorkie@2.0.0) 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!

@ginomempin
Copy link
Author

ginomempin commented Apr 3, 2020

@Cebape

So, create your projects outside the root / folder, make Linux updates (Ubuntu ...)

Can you clarify what you mean by "outside the root / folder"?
This is Linux, everything is under /.

@Cebape
Copy link

Cebape commented Apr 3, 2020 via email

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

5 participants