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

bug with meta npm link --all #292

Open
lexoyo opened this issue Mar 16, 2022 · 7 comments
Open

bug with meta npm link --all #292

lexoyo opened this issue Mar 16, 2022 · 7 comments
Labels

Comments

@lexoyo
Copy link

lexoyo commented Mar 16, 2022

🐛 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 lexoyo added the bug label Mar 16, 2022
@lexoyo
Copy link
Author

lexoyo commented Mar 16, 2022

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
Copy link

acrois commented Apr 4, 2022

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
Copy link
Author

lexoyo commented Apr 4, 2022

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

@patrickleet
Copy link
Collaborator

I can review a PR @lexoyo

@lexoyo
Copy link
Author

lexoyo commented May 6, 2022

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
Copy link

stale bot commented Aug 13, 2022

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.

@stale stale bot added the wontfix label Aug 13, 2022
@mateodelnorte
Copy link
Owner

mateodelnorte commented Oct 11, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants