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

yarn fails in chroot environment #8174

Open
ioweb-gr opened this issue Jun 6, 2020 · 1 comment
Open

yarn fails in chroot environment #8174

ioweb-gr opened this issue Jun 6, 2020 · 1 comment

Comments

@ioweb-gr
Copy link

ioweb-gr commented Jun 6, 2020

Bug description

I'm trying to use yarn in a chroot environment on ubuntu 18.04 but it's facing issues when installing node-sass
The error is

[4/4] Building fresh packages...
[1/3] ⡀ core-js
[2/3] ⡀ uglifyjs-webpack-plugin
verbose 12.811978239 Error: /httpdocs/node_modules/node-sass: Command failed.
Exit code: 127
Command: node scripts/install.js
Arguments:
Directory: /httpdocs/node_modules/node-sass
Output:
/tmp/yarn--1591421669328-0.41023769287485123/node: 3: exec: /tmp/yarn--1591421669328-0.41023769287485123/../node: not found
    at ProcessTermError.ExtendableBuiltin (/usr/local/lib/node_modules/yarn/lib/cli.js:721:66)
    at ProcessTermError.MessageError (/usr/local/lib/node_modules/yarn/lib/cli.js:750:123)
    at new ProcessTermError (/usr/local/lib/node_modules/yarn/lib/cli.js:790:113)
    at ChildProcess.<anonymous> (/usr/local/lib/node_modules/yarn/lib/cli.js:25884:17)
    at ChildProcess.emit (events.js:311:20)
    at maybeClose (internal/child_process.js:1021:16)
    at Socket.<anonymous> (internal/child_process.js:443:11)
    at Socket.emit (events.js:311:20)
    at Pipe.<anonymous> (net.js:668:12)
error /httpdocs/node_modules/node-sass: Command failed.
Exit code: 127
Command: node scripts/install.js
Arguments:
Directory: /httpdocs/node_modules/node-sass
Output:
/tmp/yarn--1591421669328-0.41023769287485123/node: 3: exec: /tmp/yarn--1591421669328-0.410237692874851

Command

yarn add node-sass

What is the current behavior?
Currently it's throwing an error because it cannot find node. However on my chrooted shell node exists and works. If I execute node -v it gives a result.
which node shows the path /usr/bin/node

For some reason yarn is trying to use a node that's in /tmp/yarn.XXXXXXX-XXXX/node which points to /tmp/node

If I add a symlink to that path everything works.

What is the expected behavior?
node is detected correctly in the environment and node-sass is installed

Steps to Reproduce

  1. I'm not sure how to replicate this as I'm facing it in a server installation that uses chroot and I'm an isolated user. The hosting provider uses PLESK

Environment

  • Node Version: v12.16.1
  • Yarn v1 Version: 1.22.4
  • OS and version: Ubuntu 18.04.4 LTS

npm install node-sass works correctly.

@ioweb-gr
Copy link
Author

Any help with this one guys?

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

1 participant