Package Details: nodejs-jshint 2.13.6-1

Git Clone URL: https://aur.archlinux.org/nodejs-jshint.git (read-only, click to copy)
Package Base: nodejs-jshint
Description: Static analysis tool for JavaScript
Upstream URL: https://jshint.com/
Licenses: MIT
Submitter: None
Maintainer: alerque
Last Packager: alerque
Votes: 57
Popularity: 0.000000
First Submitted: 2011-11-17 23:50 (UTC)
Last Updated: 2024-03-28 00:55 (UTC)

Latest Comments

1 2 Next › Last »

christoph.gysin commented on 2021-03-24 07:35 (UTC)

Please remove --user root to avoid installing the root npm module

tjbp commented on 2020-02-13 07:58 (UTC)

@caleb the .SRCINFO has a package release of 5, but the PKGBUILD is set to 4. This results in an endless installation loop - please bump the PKGBUILD to match. Thanks!

alerque commented on 2020-02-10 11:07 (UTC) (edited on 2020-02-10 15:27 (UTC) by alerque)

@GFdevelop Thanks for the pointer to npm docs. I only adopted this to bump the version originally and was unaware of the npm issues (as it's not my usual stomping ground). I think I've fixed everything you mentioned.

Edit: Also fixed similar issues is a few other things I have in the AUR, so thanks again for better packages all round.

GFdevelop commented on 2020-02-10 10:21 (UTC) (edited on 2020-02-10 10:51 (UTC) by GFdevelop)

In the arch wiki there are only 3 rules for npm packages and this package don't respect one of them:

  • 777 permissions and non root owner
  • temporary cache littering my home
  • the package contains reference to $srcdir/$pkgdir

Please read here: https://wiki.archlinux.org/index.php/Node.js_package_guidelines

The fix is:

package() {
    npm install -g --user root --prefix "$pkgdir/usr" "$srcdir/${source[@]##*/}"

    # Non-deterministic race in npm gives 777 permissions to random directories.
    # See <https://github.com/npm/npm/issues/9359> 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"

    find "$pkgdir" -name package.json -print0 | xargs -r -0 sed -i '/_where/d'

    local tmppackage="$(mktemp)"
    local pkgjson="$pkgdir/usr/lib/node_modules/$_npmname/package.json"
    jq '.|=with_entries(select(.key|test("_.+")|not))' "$pkgjson" > "$tmppackage"
    mv "$tmppackage" "$pkgjson"
    chmod 644 "$pkgjson"
}

Neelo commented on 2019-04-30 00:57 (UTC)

You should probably follow the Node.js Package Guidelines (https://wiki.archlinux.org/index.php/Node.js_package_guidelines) and include the fix for the race condition to avoid issues like the one DeemoDing mentioned.

DeemoDing commented on 2018-12-28 11:30 (UTC)

[2018-12-28 17:24] [ALPM] warning: directory permissions differ on /usr/bin/ filesystem: 755 package: 777 [2018-12-28 17:24] [ALPM] warning: directory permissions differ on /usr/lib/node_modules/jshint/ filesystem: 755 package: 777 [2018-12-28 17:24] [ALPM] warning: directory permissions differ on /usr/lib/node_modules/jshint/data/ filesystem: 755 package: 777 [2018-12-28 17:24] [ALPM] warning: directory permissions differ on /usr/lib/node_modules/jshint/dist/ filesystem: 755 package: 777 [2018-12-28 17:24] [ALPM] warning: directory permissions differ on /usr/lib/node_modules/jshint/node_modules/concat-map/example/ filesystem: 755 package: 777 [2018-12-28 17:24] [ALPM] warning: directory permissions differ on /usr/lib/node_modules/jshint/node_modules/concat-map/test/ filesystem: 755 package: 777 [2018-12-28 17:24] [ALPM] warning: directory permissions differ on /usr/lib/node_modules/jshint/node_modules/core-util-is/ filesystem: 755 package: 777 [2018-12-28 17:24] [ALPM] warning: directory permissions differ on /usr/lib/node_modules/jshint/node_modules/date-now/ filesystem: 755 package: 777 ...............

I think you know what happens

alerque commented on 2018-08-22 11:09 (UTC)

@sum01 Done.

sum01 commented on 2018-03-03 18:00 (UTC) (edited on 2018-03-03 18:00 (UTC) by sum01)

Can npm be made a makedepends instead of depends?

BoySka commented on 2016-02-24 20:01 (UTC)

https:// in the source will work; could you switch to it? I can submit a patch, but it is probably easier if you just do it yourself.

justin8 commented on 2015-05-21 23:44 (UTC)

Hi, it looks like this needs to depend on npm now as well: Notice: npm is not shipped with nodejs since 0.12.2-4, please install npm manually if you need it. Optional dependencies for nodejs npm: nodejs package manager /startdir/PKGBUILD: line 22: npm: command not found