3.4.0
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)
From the command line, just do npm install @vue/cli-service
.
The installation of @vue/cli-service is successful.
The installation fails with the following error message:
> [email protected] 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: [email protected] (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm64"})
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.
When inspecting the NPM debug logs:
22191 verbose stack Error: [email protected] 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 [email protected]
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 [email protected] install: `node bin/install.js`
22200 error Exit status 1
22201 error Failed at the [email protected] install script.
The same error is encountered when doing:
npm install @vue/cli
npm install yorkie
I know that there is a similar issue posted at https://github.com/vuejs/vue-cli/issues/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_").
Have you tried installing vue-cli
globally as described here:
npm install -g @vue/cli
# OR
yarn global add @vue/cli
@caugner
I got the same error when I installed @vue/cli and @vue/cli-service globally.
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.
What about npm install @vue/cli-service --unsafe-perm
?
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.
Thanks for the tip @sodatea.
It looks like I got it to install successfully now.
npm install @vue/cli --unsafe-perm
(also works with -g
)npm install @vue/cli-service --unsafe-perm
(also works with -g
)Solved issue by using latest node image for container FROM node:latest
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!
@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 /.
Hi!Â
I suggest not creating projects inside the /root folder to avoid setting access permissions for your objects, unless this is a requirement for your development environment. For example, create a project folder inside the /home directory as /my-project and inside it create the vuejs project and execute it. If you are using an IDE editor such as Visual Studio Code (or Atom) to open and modify the project folder, you may need to give permissions to it (chmod). I successfully tested the host machine, VM and Docker-CE container (all with Ubuntu 18.04 and Vue-CLI 4.2.3).
Em sexta-feira, 3 de abril de 2020 09:06:18 BRT, Gino Mempin notifications@github.com escreveu:
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 /.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
Most helpful comment
For security reasons, if you run
npm install
asroot
, npm will set the user to "nobody" when running postinstall scripts, which does not have access to the project directory, thus the error message.