Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Alexandru Ardelean <ardeleanalex@gmail.com>,
	Angelo Compagnucci <angelo.compagnucci@gmail.com>,
	Martin Bark <martin@barkynet.com>,
	Daniel Price <daniel.price@gmail.com>,
	Buildroot List <buildroot@buildroot.org>
Subject: Re: [Buildroot] [PATCH 3/4] package/nodejs: add patch to adjust default NodeJS search path
Date: Sun, 25 Sep 2022 21:23:23 +0200	[thread overview]
Message-ID: <20220925212323.53b314de@windsurf> (raw)
In-Reply-To: <20220925181557.GB1419013@scaer>

On Sun, 25 Sep 2022 20:15:57 +0200
"Yann E. MORIN" <yann.morin.1998@free.fr> wrote:

> It looks like this is an array, so maybe we could keep the original
> path, and add the npm installation path:
> 
>     const paths = [path.resolve(prefixDir, 'lib', 'node'),
>                    path.resolve(prefixDir, 'lib', 'node_modules'),];
> 
> This, in case some ot-of-tree packages simply copy files into the
> original .../node/ directory.

Good point, I've sent a v2 which does exactly this.

> Alternatively, we could symlink node_modules to node.

I did consider the symlink solution as well, but I worried (perhaps
wrongly, or too conservatively) that it could get removed. Or it would
have to be the other way around: node -> node_modules, as npm installs
in node_modules and I would be worried of npm being unhappy with
installing inside a path that contains a symlink.

Overall, I found patching the search path to be safer, but if the
symlink solution is preferred, I can definitely implement it.

Best regards,

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2022-09-25 19:23 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-25 17:19 [Buildroot] [PATCH 1/4] package/nodejs: fixup qemu dependencies Thomas Petazzoni
2022-09-25 17:19 ` [Buildroot] [PATCH 2/4] package/nodejs: bump to v16.17.1 Thomas Petazzoni via buildroot
2022-09-25 18:17   ` Yann E. MORIN
2022-10-11 19:19   ` Peter Korsgaard
2022-10-12  8:26     ` Peter Korsgaard
2022-10-14 19:33       ` Yann E. MORIN
2022-09-25 17:19 ` [Buildroot] [PATCH 3/4] package/nodejs: add patch to adjust default NodeJS search path Thomas Petazzoni
2022-09-25 18:15   ` Yann E. MORIN
2022-09-25 19:23     ` Thomas Petazzoni [this message]
2022-09-25 17:19 ` [Buildroot] [PATCH 4/4] support/testing/tests: add NodeJS tests Thomas Petazzoni
2022-09-25 18:16 ` [Buildroot] [PATCH 1/4] package/nodejs: fixup qemu dependencies Yann E. MORIN
2022-10-11 18:53 ` Peter Korsgaard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220925212323.53b314de@windsurf \
    --to=thomas.petazzoni@bootlin.com \
    --cc=angelo.compagnucci@gmail.com \
    --cc=ardeleanalex@gmail.com \
    --cc=buildroot@buildroot.org \
    --cc=daniel.price@gmail.com \
    --cc=martin@barkynet.com \
    --cc=yann.morin.1998@free.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox