Talk:Node.js package guidelines

From ArchWiki

Forum thread

Is there any nodejs developer/packager can help me to improve the Node.js package guidelines?

See this https://bbs.archlinux.org/viewtopic.php?id=253060

GFdevelop (talk) 16:48, 22 February 2020 (UTC)

Obsolete package() fixes?

 package() {
   npm install -g --user root --prefix "${pkgdir}/usr" "${srcdir}/${pkgname}-${pkgver}.tgz"
   
   # Non-deterministic race in npm gives 777 permissions to random directories.
   # See https://github.com/npm/cli/issues/1103 for details.
   find "${pkgdir}/usr" -type d -exec chmod 755 {} +
   
   # npm gives ownership of ALL FILES to build user
   # https://bugs.archlinux.org/task/63396
   chown -R root:root "${pkgdir}"
 }
  • npm 7.x is now in testing and fixes the first issue.
  • The second issue is closed since September 2019?

Aureooms (talk) 09:48, 17 February 2021 (UTC)

I tested by removing each of these fixes on my package. Looks like the "777 to directories" issue does not occur anymore, but "ownership to build user" issue still persists.
Ilango100 (talk) 08:05, 19 March 2021 (UTC)
I've removed the permission hack, as it was fixed upstream, and requested reopen of the 63396 issue as the build ownership is still an issue and many packages point to that ID.
C0rn3j (talk)

Is it .nvrc or .nvmrc?

I cannot find good docs on the .nvrc file. Is it a typo? —This unsigned comment is by FENPRACE (talk) 03:54, 19 December 2021 (UTC). Please sign your posts with ~~~~!