mateodelnorte / meta

tool for turning many repos into a meta repo. why choose many repos or a monolithic repo, when you can have both with a meta repo?
MIT License
2.03k stars 95 forks source link

bug with meta npm link --all #292

Open lexoyo opened 2 years ago

lexoyo commented 2 years ago

🐛 Bug Report

When I run meta npm link && meta npm link --all my projects do not build anymore because their node_module/.bin folders are not populated anymore with all the scripts they need

To Reproduce

Steps to reproduce the behavior:

  1. meta npm link && meta npm link --all
  2. cd package/myproject
  3. npm run build

=> missing scripts for libs that are not linked

Expected behavior

.bin should contain all the same script as before linking, except for the linked libs

lexoyo commented 2 years ago

I ended up writing this script as a workaround

It runs a command in all project to link all the projects

#!/usr/bin/env node

const metaLoop = require('meta-loop')
const fs = require('fs')

// build the command to link all projects
const {projects} = JSON.parse(fs.readFileSync('./.meta').toString())
const command = `npm link ${Object.keys(projects).map(project => project.split('/').pop()).join(' ')}`

console.log(`meta exec "${command}"`)

metaLoop(command)

console.log('done')
acrois commented 2 years ago

Was looking for a solution to this, thank you @lexoyo.

From what I could find, it seems related to the code in the https://github.com/mateodelnorte/meta-npm repository (maybe this file).

Since you've already worked around it, and are most familiar with the problem+solution, you could probably make a PR that fixes it for good and get it integrated.

lexoyo commented 2 years ago

Hi @acrois I don't really remember but I guess I could check it out @mateodelnorte are you still around and accepting PRs?

patrickleet commented 2 years ago

I can review a PR @lexoyo

lexoyo commented 2 years ago

Hi I am still on this one, for now using this script as described in the readme Once it is working properly i'll do a PR

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

mateodelnorte commented 1 year ago

Yep

On Sun, Apr 3, 2022 at 9:00 PM Alex Hoyau @.***> wrote:

Hi @acrois https://github.com/acrois I don't really remember but I guess I could check it out @mateodelnorte https://github.com/mateodelnorte are you still around and accepting PRs?

— Reply to this email directly, view it on GitHub https://github.com/mateodelnorte/meta/issues/292#issuecomment-1087083362, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAEHOXZDSEUHEXNRHSWNKR3VDJSOFANCNFSM5Q4GNHCA . You are receiving this because you were mentioned.Message ID: @.***>