Skip to content
This repository has been archived by the owner on Mar 4, 2022. It is now read-only.

[Bug] Handle yarn flattening deps but leaving symlinks in different places. #134

Closed
ryan-roemer opened this issue Nov 10, 2016 · 0 comments · Fixed by #135
Closed

[Bug] Handle yarn flattening deps but leaving symlinks in different places. #134

ryan-roemer opened this issue Nov 10, 2016 · 0 comments · Fixed by #135
Labels

Comments

@ryan-roemer
Copy link
Member

Internal tracking branch: greenkeeper/formidable-charts-docs-1.4.0

Error

[builder:proc:start] Command: rimraf lib
sh: rimraf: command not found
[builder:proc:end:127] Command: rimraf lib
[builder:builder-core:end:94844] Task: run clean-lib, Error: Command failed: sh -c rimraf lib

[builder:proc:end:127] Command: builder run clean-lib && babel src -d lib --copy-files
[builder:builder-core:end:94842] Task: run build-lib, Error: Command failed: sh -c builder run clean-lib && babel src -d lib --copy-files

[builder:proc:end:127] Command: builder run build-lib && builder run build-dist
[builder:builder-core:end:94840] Task: run build, Error: Command failed: sh -c builder run build-lib && builder run build-dist

[builder:proc:end:127] Command: cd lib || builder run build --expand-archetype
[builder:builder-core:end:94838] Task: run npm:postinstall, Error: Command failed: sh -c cd lib || builder run build --expand-archetype

Research

Yarn: So, first, let's find directories or script links for rimraf.

$ yarn cache clean
$ yarn install

$ find \
  node_modules \
  node_modules/.bin \
  node_modules/formidable-charts/node_modules/.bin \
  node_modules/builder-victory-component/node_modules/.bin \
  -maxdepth 1 \
  -name rimraf

node_modules/rimraf
node_modules/builder-victory-component/node_modules/.bin/rimraf

Next, let's check where the rimraf script actually points to:

$ ls -l node_modules/builder-victory-component/node_modules/.bin/rimraf
lrwxr-xr-x  1 rye  staff  22 Nov 10 10:58 node_modules/builder-victory-component/node_modules/.bin/rimraf -> ../../../rimraf/bin.js

npm: Now let's do the same for npm:

$ npm install

$ find \
  node_modules \
  node_modules/.bin \
  node_modules/formidable-charts/node_modules/.bin \
  node_modules/builder-victory-component/node_modules/.bin \
  -maxdepth 1 \
  -name rimraf

node_modules/rimraf
node_modules/.bin/rimraf

let's check where the rimraf script actually points to:

$ ls -l node_modules/.bin/rimraf
lrwxr-xr-x  1 rye  staff  16 Nov 10 12:35 node_modules/.bin/rimraf -> ../rimraf/bin.js

and it's different.

ryan-roemer added a commit that referenced this issue Nov 18, 2016
#135)

* Add in `NODE_PATH` and `PATH` from _actual resolved paths_ of prod and dev archetypes instead of guessed paths. This will better support `yarn`, which flattens `node_modules/.bin` in different ways than real `npm`. It is also likely more correct than before. Fixes #134
* Add extra higher level directory check when `LOCAL_DEV=true` and `--expand-archetype` specified.
* Make config loading failure a simple `log.info` instead of `log.warn`.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant