Titanium JIRA Archive
Appcelerator Daemon (DAEMON)

[DAEMON-330] Lerna cannot find Yarn when installing default plugins on Windows

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2020-03-31T20:11:40.000+0000
Affected Version/sAppc Daemon 3.2.0
Fix Version/sAppc Daemon 4.0.0
Componentsappcd-default-plugins
Labelsn/a
ReporterChris Barber
AssigneeChris Barber
Created2020-02-26T23:18:07.000+0000
Updated2020-03-31T20:11:43.000+0000

Description

appcd-default-plugins can find Yarn, but Lerna cannot. Probably a bug that is easily reproducible on a clean Windows machine as a dev machine likely has Yarn already installed. System is running Node.js 10.13.0. Appc Daemon core is running Node.js 10.16.3.
2020-02-26T22:39:32.624Z appcd:default-plugins Found yarn: C:\Users\Test\.appcelerator\install\8.0.0-master.10\package\node_modules\.bin\yarn.cmd
2020-02-26T22:39:32.669Z appcd:default-plugins Found lerna: C:\Users\Test\.appcelerator\install\8.0.0-master.10\package\node_modules\.bin\lerna.cmd
2020-02-26T22:39:32.683Z appcd:default-plugins Found installed plugin @appcd/plugin-android@1.5.2
2020-02-26T22:39:32.685Z appcd:default-plugins warn Plugin directory name mismatch: @appcd/plugin-android-2_0_1@2.0.1 found in @appcd/plugin-android, invalidating...
2020-02-26T22:39:32.695Z appcd:default-plugins Found installed plugin @appcd/plugin-genymotion@1.6.1
2020-02-26T22:39:32.697Z appcd:default-plugins Found installed plugin @appcd/plugin-jdk@1.6.1
2020-02-26T22:39:32.698Z appcd:default-plugins warn Plugin directory name mismatch: @appcd/plugin-system-info-1_5_1@1.5.1 found in @appcd/plugin-system-info, invalidating...
2020-02-26T22:39:32.705Z appcd:default-plugins Found installed plugin @appcd/plugin-system-info@2.0.0
2020-02-26T22:39:32.706Z appcd:default-plugins Found installed plugin @appcd/plugin-titanium@1.8.1
2020-02-26T22:39:32.707Z appcd:default-plugins warn Plugin directory name mismatch: @appcd/plugin-windows-1_5_2@1.5.2 found in @appcd/plugin-windows, invalidating...
2020-02-26T22:39:32.714Z appcd:default-plugins Found installed plugin @appcd/plugin-windows@2.0.1
2020-02-26T22:39:32.898Z appcd:default-plugins warn Skipping incompatible plugin: @appcd/plugin-ios@^1.5.2
2020-02-26T22:39:32.903Z appcd:default-plugins Downloading @appcd/plugin-windows@1.5.2
2020-02-26T22:39:32.907Z appcd:default-plugins warn Skipping incompatible plugin: @appcd/plugin-ios@^2.0.2
2020-02-26T22:39:32.910Z appcd:default-plugins Downloading @appcd/plugin-android@2.0.1
2020-02-26T22:39:32.913Z appcd:default-plugins Downloading @appcd/plugin-system-info@1.5.1
2020-02-26T22:39:33.045Z appcd:default-plugins Writing plugins/package.json
2020-02-26T22:39:33.049Z appcd:default-plugins Writing plugins/lerna.json
2020-02-26T22:39:33.051Z appcd:default-plugins Plugins dir: C:\Users\Test\.appcelerator\appcd\plugins
2020-02-26T22:39:33.052Z appcd:default-plugins Executing: C:\Users\Test\.appcelerator\install\8.0.0-master.10\package\node_modules\.bin\lerna.cmd bootstrap --no-progress
2020-02-26T22:39:34.085Z appcd:default-plugins:lerna cli v3.20.2
2020-02-26T22:39:34.112Z appcd:default-plugins:lerna versioning independent
2020-02-26T22:39:34.200Z appcd:default-plugins:lerna bootstrap root only
2020-02-26T22:39:34.249Z appcd:default-plugins:lerna 'yarn' is not recognized as an internal or external command,
2020-02-26T22:39:34.251Z appcd:default-plugins:lerna operable program or batch file.
2020-02-26T22:39:34.254Z appcd:default-plugins:lerna lerna ERR! yarn install --mutex network:42424 --non-interactive --emoji=false --ignore-engines --no-lockfile --no-progress --production exited 2 in 'root'
2020-02-26T22:39:34.255Z appcd:default-plugins:lerna lerna ERR! yarn install --mutex network:42424 --non-interactive --emoji=false --ignore-engines --no-lockfile --no-progress --production exited 2 in 'root'
2020-02-26T22:39:34.268Z appcd:default-plugins warn lerna exited with code 2
This ticket may moot with the new plugin management command (DAEMON-311) and the upgrade to Yarn 2 (DAEMON-318).

Comments

  1. Ewan Harris 2020-02-27

    [~cbarber] is this an existing problem with appcd 3? This should probably block the CLI 8 RC?
  2. Chris Barber 2020-02-27

    Possibly? I don't know. I haven't had time to reproduce yet. I suspect this may be an easy fix by injecting the path to yarn that we found into the PATH environment variable when we spawn lerna.
  3. Ewan Harris 2020-02-27

    I uninstalled yarn and I couldn't repro this, it seemed to resolve it just fine for me. Albeit I was on Node 12
  4. Samir Mohammed 2020-03-02

    I was able to get this error using node 10.13.0 but when using node 12.13.1 everything seemed fine.
  5. Satyam Sekhri 2020-03-04

    Yarn installs successfully and daemon commands run successfully. Verified on: OS: Win 10 Pro Node: 10.13.0 Appc NPM: 5.0.0-4 Appc CLI: 8.0.0-master.12 Daemon: 3.2.0
  6. Chris Barber 2020-03-31

    Reopening to change fix version.

JSON Source