Closed Bug 1780866 Opened 2 years ago Closed 2 years ago

newtab package.json requires old node and npm versions (10.23.*, 6.14.10) and has package version conflicts

Categories

(Firefox :: Messaging System, defect, P2)

defect

Tracking

()

RESOLVED FIXED
Iteration:
113.1 - Mar 13 - Mar 24

People

(Reporter: sfoster, Assigned: nsauermann)

References

(Blocks 1 open bug)

Details

Attachments

(1 obsolete file)

We have an engines configuration in package.json which requires an old version of node. If you use mach npm and mach node as instructed by the docs there are module version problems. The npm install step produces this error:

pm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: 'activity-streams@1.14.3',
npm WARN EBADENGINE   required: {
npm WARN EBADENGINE     firefox: '>=45.0 <=*',
npm WARN EBADENGINE     '//': 'when changing node versions, also edit .nvmrc',
npm WARN EBADENGINE     node: '10.23.*',
npm WARN EBADENGINE     npm: '6.14.10'
npm WARN EBADENGINE   },
npm WARN EBADENGINE   current: { node: 'v16.0.0', npm: '7.10.0' }
npm WARN EBADENGINE }

And the npm run bundle step fails. I think we need to update that package.json with the same versions that mach is using (and ideally find a way to tie the 2 together).

I was able to get this to work temporarily by using nvm to downgrade to node v10.

This just bit mconley today too...

Severity: -- → S4
Type: task → defect
Iteration: --- → 112.2 - Feb 27 - Mar 10
Component: New Tab Page → Messaging System
Priority: -- → P2

NI @dmosedale to help add more context on fix thanks

Flags: needinfo?(dmosedale)
Iteration: 112.2 - Feb 27 - Mar 10 → 113.1 - Mar 13 - Mar 24

Proposed fix: edit package.json (and probably .nvmrc) to update to the current versions (node = 16.19.* and npm = 8.19.* ) with a bit of security version flex. I think we want to keep the versions specified pretty tightly because it generates artifacts that get checked in and we want those to be modern and identical across users. I propose node = 16.19.* and npm = 8.19.*

https://searchfox.org/mozilla-central/rev/af78418c4b5f2c8721d1a06486cf4cf0b33e1e8d/browser/components/newtab/package.json#63 has more details.

Flags: needinfo?(dmosedale)
Assignee: nobody → nsauermann

(And by "current version", I mean the versions that running ./mach bootstrap currently causes to be installed in ./mach build and then used by ./mach node and ./mach npm).

Attachment #9323022 - Attachment description: WIP: Bug 1780866 - newtab package.json requires old node and npm versions (10.23.*, 6.14.10) and has package version conflicts → Bug 1780866 - newtab package.json requires old node and npm versions (10.23.*, 6.14.10) and has package version conflicts
See Also: → 1822664

This ended up getting fixed in bug 1786582 (phab patch); sorry for the crossed wires, Negin!

Status: NEW → RESOLVED
Closed: 2 years ago
Depends on: 1786582
Resolution: --- → FIXED
Attachment #9323022 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: