Skip to content

Path *bug* using wrong node binary. #5789

Open
@GlassGhost

Description

@GlassGhost

What is the current behavior?
Install command fails; won't run without sudo access, using wrong path to get node binary.

owner@Z50-75:~/yarn-sandbox/simple-samples/hash$ ~/yarn-sandbox/node/node ~/yarn-sandbox/yarn-1.6.0.js --cache-folder ~/yarn-sandbox/yarncache install
yarn install v1.6.0
info No lockfile found.
[1/4] Resolving packages...
warning electron > electron-download > nugget > progress-stream > through2 > xtend > object-keys@0.4.0: 
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
[1/1] ⠂ electron
[-/1] ⠂ waiting...
[-/1] ⠂ waiting...
[-/1] ⠂ waiting...
error /home/owner/yarn-sandbox/simple-samples/hash/node_modules/electron: Command failed.
Exit code: 127
Command: node install.js
Arguments: 
Directory: /home/owner/yarn-sandbox/simple-samples/hash/node_modules/electron




owner@Z50-75:~/yarn-sandbox/simple-samples/hash$ ~/yarn-sandbox/node/node ~/yarn-sandbox/yarn-1.6.0.js start
yarn run v1.6.0
$ electron app.js
/usr/bin/env: ‘node’: No such file or directory
error Command failed with exit code 127.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
owner@Z50-75:~/yarn-sandbox/simple-samples/hash$ 

If the current behavior is a bug, please provide the steps to reproduce.
My friend didn't have node installed on his system so I sent him the commands to compile it, on my system I believe it's using the wrong version of node to install it wouldn't work on his system(vanilla ubuntu 16.04) without first running the commented out link command.

#Sandbox for https://github.com/electron/electron
mkdir ~/yarn-sandbox
cd ~/yarn-sandbox
wget https://github.com/yarnpkg/yarn/releases/download/v1.6.0/yarn-1.6.0.js
git clone https://github.com/electron/simple-samples
git clone -b 'v8.11.1' --single-branch --depth 1 https://github.com/nodejs/node
cd ~/yarn-sandbox/node
./configure
make -j4

#this shouldn't be necessary
#sudo ln -s '/home/owner/yarn-sandbox/node/out/Release/node' /usr/bin/node

cd ~/yarn-sandbox/simple-samples/hash
~/yarn-sandbox/node/node ~/yarn-sandbox/yarn-1.6.0.js --cache-folder ~/yarn-sandbox/yarncache install
~/yarn-sandbox/node/node ~/yarn-sandbox/yarn-1.6.0.js start

What is the expected behavior?
Should not need sudo access to /usr/bin/node
screenshot

Please mention your node.js, yarn and operating system version.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions