Closed Bug 1432892 Opened 2 years ago Closed 2 years ago

(Debian GNU/Linux) |mach boostrap| fails since the package |npm| is missing.


(Firefox Build System :: General, defect, major)

Not set


(firefox58 unaffected, firefox59 fixed, firefox60 fixed)

Tracking Status
firefox58 --- unaffected
firefox59 --- fixed
firefox60 --- fixed


(Reporter: ishikawa, Assigned: Sylvestre)




(1 file)

I am using Debian GNU/Linux.
After upgrading OS packages in mid-December, I cannot run |mach bootstrap|
since |npm| package which is installed by |mach| is no longer in the standard package (of stretch).

The failure log.

Sorry, I tried to change the LOCALE to C locale, but somehow, mach still spews out the error message in Japanese.
The crux of the error is
|E: パッケージ npm が見つかりません|,
which translates "package npm is not found".
Actually, it is |E: Unable to locate package npm| in official translation.

--- begin log from |mach bootstrap|
ishikawa@ip030: /NREF-COMM-CENTRAL/comm-centralishikawa@ip030:/NREF-COMM-CENTRAL/comm-central$ mozilla/mach bootstrap
kind=None       <- this and the following two lines are from
environ.get('TERM', 'unknown')=xterm-256color <--- the dump from a patch
environ.get('TERM', 'linux')=xterm-256color   <--- in Bug 1432867

Note on Artifact Mode:

Firefox for Desktop and Android supports a fast build mode called
artifact mode. Artifact mode downloads pre-built C++ components rather
than building them locally, trading bandwidth for time.

Artifact builds will be useful to many developers who are not working
with compiled code. If you want to work on look-and-feel of Firefox,
you want "Firefox for Desktop Artifact Mode".

Similarly, if you want to work on the look-and-feel of Firefox for Android,
you want "Firefox for Android Artifact Mode".

To work on the Gecko technology platform, you would need to opt to full,
non-artifact mode. Gecko is Mozilla's web rendering engine, similar to Edge,
Blink, and WebKit. Gecko is implemented in C++ and JavaScript. If you
want to work on web rendering, you want "Firefox for Desktop", or
"Firefox for Android".

If you don't know what you want, start with just Artifact Mode of the desired
platform. Your builds will be much shorter than if you build Gecko as well.
But don't worry! You can always switch configurations later.

You can learn more about Artifact mode builds at

Please choose the version of Firefox you want to build:
1. Firefox for Desktop Artifact Mode
2. Firefox for Desktop
3. Firefox for Android Artifact Mode
4. Firefox for Android
Your choice: 2
Executing as root: sudo apt-get install autoconf2.13 build-essential ccache nodejs python-dev python-pip python-setuptools unzip uuid zip npm
[sudo] ishikawa のパスワード:
パッケージリストを読み込んでいます... 0%パッケージリストを読み込んでいます... 100%パッケージリストを読み込んでいます... 完了
依存関係ツリーを作成しています... 100%
状態情報を読み取っています... 100%
E: パッケージ npm が見つかりません
Error running mach:


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

The details of the failure are as follows:

CalledProcessError: Command '[u'sudo', u'apt-get', u'install', 'autoconf2.13', 'build-essential', 'ccache', 'nodejs', 'python-dev', 'python-pip', 'python-setuptools', 'unzip', 'uuid', 'zip', 'npm']' returned non-zero exit status 100

  File "/NREF-COMM-CENTRAL/comm-central/mozilla/python/mozboot/mozboot/", line 32, in bootstrap
  File "/NREF-COMM-CENTRAL/comm-central/mozilla/python/mozboot/mozboot/", line 294, in bootstrap
  File "/NREF-COMM-CENTRAL/comm-central/mozilla/python/mozboot/mozboot/", line 103, in install_system_packages
  File "/NREF-COMM-CENTRAL/comm-central/mozilla/python/mozboot/mozboot/", line 352, in apt_install
  File "/NREF-COMM-CENTRAL/comm-central/mozilla/python/mozboot/mozboot/", line 308, in run_as_root
    subprocess.check_call(command, stdin=sys.stdin)
  File "/usr/lib/python2.7/", line 190, in check_call
    raise CalledProcessError(retcode, cmd)
^[]0;ishikawa@ip030: /NREF-COMM-CENTRAL/comm-centralishikawa@ip030:/NREF-COMM-CENTRAL/comm-central$ exit

Script done on 2018-01-25 04:31:09+0900
--- end log from |mach bootstrap|

I have done |apt-get install npm| as a command and you see the English message when I set LANG to C.
--- begin log

root@ip030:/NREF-COMM-CENTRAL/comm-central# apt-get install npm
パッケージリストを読み込んでいます... 完了
状態情報を読み取っています... 完了
E: パッケージ npm が見つかりません
root@ip030:/NREF-COMM-CENTRAL/comm-central# export LANG=C
root@ip030:/NREF-COMM-CENTRAL/comm-central# apt-get install npm
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package npm
--- end log

To their credit, NPM developers have prepared a web page to cope with this:
(Oops, according to the web page, Ubunto may be also affected by this. If so, the future ubuntu users need to be warned. I am afraid that there are many more ubuntu users than Debian users among patch developers.)
HOWEVER, as an ordinary user, I have a bit of hesitation when I see |bash| is run by feeding it an output of a command that fetches something from a remote site, and under super privilege at that ...

Also, this was already noticed and reported to Debian, too. 
From a post by in dev-builds mailing list,
His post is found in the thread at the bottom.

--- begin quote ---

Could you please report a bug?

Mark added npm as a dependency on Debian [1], as I run Debian unstable, I didn't see it wasn't available for stretch or testing.

Sorry about that.

I also reported a bug on Debian side [2] so that it is clear that npm needs love in Debian.



--- end quote ---

See Also: → 1424921
Component: mach → Build Config
Assignee: nobody → sledru
Comment on attachment 8945755 [details]
Bug 1432892 - Comment the npm package dependency until Debian brings it back
Attachment #8945755 - Flags: review?(standard8) → review+
Pushed by
Comment the npm package dependency until Debian brings it back r=standard8
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla60
Blocks: 1424921
See Also: 1424921
Comment on attachment 8945755 [details]
Bug 1432892 - Comment the npm package dependency until Debian brings it back

Approval Request Comment
[Feature/Bug causing the regression]: Bug 1424921
[User impact if declined]:
mach bootstrap won't work on Debian
[Is this code covered by automated tests?]: No
[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?]: Just a build step
[String changes made/needed]: None
Attachment #8945755 - Flags: approval-mozilla-beta?
Comment on attachment 8945755 [details]
Bug 1432892 - Comment the npm package dependency until Debian brings it back

Looks useful for developers or anyone building Firefox on Debian stable versions - let's uplift for the 59 beta 6 build.
Attachment #8945755 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Duplicate of this bug: 1435855
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.