./mach bootstrap doesn't install npm on FreeBSD

RESOLVED FIXED in Firefox 59

Status

defect
RESOLVED FIXED
2 years ago
Last year

People

(Reporter: jbeich, Assigned: jbeich)

Tracking

Trunk
mozilla60
Unspecified
FreeBSD
Dependency tree / graph

Firefox Tracking Flags

(firefox-esr52 unaffected, firefox58 unaffected, firefox59 fixed, firefox60 fixed)

Details

Attachments

(2 attachments)

npm is packaged separately on FreeBSD. See https://www.freshports.org/www/npm then click to expand pseudo pkg-plist.

$ ./mach bootstrap
$ ./mach eslint
Node Package Manager (npm) is either not installed or installed to a
non-standard path. Please install npm from https://nodejs.org (it comes as an
option in the node installation) and try again.

Valid installation paths:
A failure occured in the eslint linter.
? 1 problem (0 errors, 0 warnings, 1 failure)
Component: Lint → Build Config
Product: Testing → Core
Version: Version 3 → Trunk
Summary: ./mach bootstrap doesn't pull npm on FreeBSD → ./mach bootstrap doesn't install npm on FreeBSD
Comment on attachment 8945350 [details]
Bug 1433036 - OpenBSD bootstrap: node-devel package doesn't exist.

https://reviewboard.mozilla.org/r/215550/#review221172

Sigh. Let's pull the kitchensink..
Attachment #8945350 - Flags: review?(landry) → review+
FYI, I went with what was listed on https://nodejs.org/en/download/package-manager/#freebsd-and-openbsd, so you might want to get that updated as well, though it looks like I made a mistake on the OpenBSD side of things.
(In reply to Mark Banner (:standard8) from comment #4)
> FYI, I went with what was listed on
> https://nodejs.org/en/download/package-manager/#freebsd-and-openbsd, so you
> might want to get that updated as well, though it looks like I made a
> mistake on the OpenBSD side of things.

FreeBSD removed www/node-devel more than 1 year ago.
https://svnweb.freebsd.org/changeset/ports/413225

As for upstream not mentioning npm is packaged separately maybe downstream maintainer knows. I don't use NodeJS myself nor have time to get involved for a one-off trivia.
I had faith and tried mach eslint on openbsd, as expected it installed all the nodejs ecosystem, and then failed anyway...

eslint-plugin-react v7.1.0 needs to be installed locally.
eslint-plugin-no-unsanitized v2.0.1 needs to be installed locally.
eslint-plugin-html v2.0.3 needs to be installed locally.
eslint-plugin-spidermonkey-js vfile:tools/lint/eslint/eslint-plugin-spidermonkey-js needs to be installed locally.
sax v1.2.4 needs to be installed locally.
eslint v3.19.0 needs to be installed locally.
eslint-plugin-mozilla vfile:tools/lint/eslint/eslint-plugin-mozilla needs to be installed locally.
ini-parser v0.0.2 needs to be installed locally.
Installing eslint for mach using "/usr/local/bin/npm install --loglevel=error"...

ESLint and approved plugins installed successfully!

NOTE: Your local eslint binary is at /home/landry/src/m-c/node_modules/.bin/eslint

Error running mach:

    ['eslint']

The error occurred in code that was called by the mach command. This is either
a bug in the called code itself or in the way that mach is calling it.

You should consider filing a bug for this issue.

If filing a bug, please include the full output of mach, including this error
message.

The details of the failure are as follows:

error: must call (at least) setupterm() first

  File "/home/landry/src/m-c/tools/lint/mach_commands.py", line 63, in eslint
    argv=extra_args, **kwargs)
  File "/home/landry/src/m-c/python/mach/mach/registrar.py", line 129, in dispatch
    return self._run_command_handler(handler, context=context, **kwargs)
  File "/home/landry/src/m-c/python/mach/mach/registrar.py", line 90, in _run_command_handler
    result = fn(**kwargs)
  File "/home/landry/src/m-c/tools/lint/mach_commands.py", line 44, in lint
    return cli.run(*runargs, **lintargs)
  File "/home/landry/src/m-c/python/mozlint/mozlint/cli.py", line 163, in run
    formatter = formatters.get(fmt)
  File "/home/landry/src/m-c/python/mozlint/mozlint/formatters/__init__.py", line 29, in get
    return all_formatters[name](**fmtargs)
  File "/home/landry/src/m-c/python/mozlint/mozlint/formatters/stylish.py", line 53, in __init__
    self.num_colors = self.term.number_of_colors
  File "/home/landry/src/m-c/third_party/python/blessings/blessings/__init__.py", line 257, in number_of_colors
    colors = tigetnum('colors')  # Returns -1 if no color support, -2 if no such cap.

why am i not surprised ?
Comment on attachment 8945349 [details]
Bug 1433036 - FreeBSD bootstrap: add npm for linting after bug 1433036.

https://reviewboard.mozilla.org/r/215548/#review221264
Attachment #8945349 - Flags: review+
Comment on attachment 8945350 [details]
Bug 1433036 - OpenBSD bootstrap: node-devel package doesn't exist.

https://reviewboard.mozilla.org/r/215550/#review221266
Attachment #8945350 - Flags: review+
Attachment #8945349 - Flags: review?(core-build-config-reviews) → review+
Attachment #8945350 - Flags: review?(core-build-config-reviews) → review+
Keywords: checkin-needed
Pushed by mbanner@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/687c51a21e42
FreeBSD bootstrap: add npm for linting after bug 1433036. r=froydnj
https://hg.mozilla.org/integration/autoland/rev/cac44122e005
OpenBSD bootstrap: node-devel package doesn't exist. r=froydnj,gaston
Keywords: checkin-needed
Comment on attachment 8945350 [details]
Bug 1433036 - OpenBSD bootstrap: node-devel package doesn't exist.

Approval Request Comment
[Feature/Bug causing the regression]: Bug 1424921 regression
[User impact if declined]: Broken ./mach bootstrap on OpenBSD
[Is this code covered by automated tests?]: No, it's for Tier3 platform
[Has the fix been verified in Nightly?]: No but has r+ from OpenBSD user
[Needs manual test from QE? If yes, steps to reproduce]: No
[List of other uplifts needed for the feature/fix]: None
[Is the change risky?]: No
[Why is the change risky/not risky?]: Can only break build
[String changes made/needed]: None
Attachment #8945350 - Flags: approval-mozilla-beta?
Comment on attachment 8945349 [details]
Bug 1433036 - FreeBSD bootstrap: add npm for linting after bug 1433036.

Approval Request Comment
[Feature/Bug causing the regression]: bug 1424921 followup
[User impact if declined]: ./mach bootstrap doesn't install a dependency for *lint
[Is this code covered by automated tests?]: No, it's for Tier3 platform
[Has the fix been verified in Nightly?]: Yes
[Needs manual test from QE? If yes, steps to reproduce]: No
[List of other uplifts needed for the feature/fix]: None
[Is the change risky?]: No
[Why is the change risky/not risky?]: Can only break build
[String changes made/needed]: None
Attachment #8945349 - Flags: approval-mozilla-beta?
Comment on attachment 8945350 [details]
Bug 1433036 - OpenBSD bootstrap: node-devel package doesn't exist.

Risk is low, as Jan points out if it's wrong the build won't work and that will be obvious. Let's get this into 59 beta 6.
Attachment #8945350 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Attachment #8945349 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Assignee: nobody → jbeich
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.