nodejs / nodejs/cjs-module-lexer

Cannot load externalized builtin: "internal/deps/cjs-module-lexer/lexer:/usr/lib/node_modules/cjs-module-lexer/lexer.js".

Open
#92 12 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
262
Forks
31
Avg merge
9d 2h
Merged PRs (30d)
5

Description

I am getting this error whenever I try to install something from npm

Error

>sudo npm install -g @angular/cli
Cannot load externalized builtin: "internal/deps/cjs-module-lexer/lexer:/usr/lib/node_modules/cjs-module-lexer/lexer.js".
----- Native stack trace -----

 1: 0x7f32e98f472e node::builtins::BuiltinLoader::AddExternalizedBuiltin(char const*, char const*) [/lib64/libnode.so.115]
 2: 0x7f32e98f4935 node::builtins::BuiltinLoader::BuiltinLoader() [/lib64/libnode.so.115]
 3: 0x7f32e98418d7 node::InitializePrimordials(v8::Local<v8::Context>) [/lib64/libnode.so.115]
 4: 0x7f32e9841a08 node::GetPerContextExports(v8::Local<v8::Context>) [/lib64/libnode.so.115]
 5: 0x7f32e98417e8 node::InitializePrimordials(v8::Local<v8::Context>) [/lib64/libnode.so.115]
 6: 0x7f32e9841ae0 node::InitializeMainContextForSnapshot(v8::Local<v8::Context>) [/lib64/libnode.so.115]
 7: 0x7f32e9841b05 node::InitializeContext(v8::Local<v8::Context>) [/lib64/libnode.so.115]
 8: 0x7f32e9841b63 node::NewContext(v8::Isolate*, v8::Local<v8::ObjectTemplate>) [/lib64/libnode.so.115]
 9: 0x7f32e997c9b4 node::NodeMainInstance::CreateMainEnvironment(node::ExitCode*) [/lib64/libnode.so.115]
10: 0x7f32e997cb0d node::NodeMainInstance::Run() [/lib64/libnode.so.115]
11: 0x7f32e98df351 node::Start(int, char**) [/lib64/libnode.so.115]
12: 0x7f32e8c4614a  [/lib64/libc.so.6]
13: 0x7f32e8c4620b __libc_start_main [/lib64/libc.so.6]
14: 0x55f96f486035 _start [node]
Aborted

File versions

  • These are the files I downloaded
Installing:
 nodejs                               x86_64              1:20.12.0-1.fc39                         updates               50 k
Installing dependencies:
 nodejs-cjs-module-lexer              noarch              1.2.3-2.fc39                             updates               37 k
 nodejs-libs                          x86_64              1:20.12.0-1.fc39                         updates               15 M
 nodejs-undici                        noarch              6.11.1-2.fc39                            updates              290 k
Installing weak dependencies:
 nodejs-docs                          noarch              1:20.12.0-1.fc39                         updates              8.2 M
 nodejs-full-i18n                     x86_64              1:20.12.0-1.fc39                         updates              8.4 M
 nodejs-npm                           x86_64              1:10.5.0-1.20.12.0.1.fc39                updates              2.2 M

Things I tried:

  • On reinstall it works, but same error after installing any package
  • Tried restarting
  • Tried logout

System Details Report


Report details

  • Date generated: 2024-04-15 10:11:23

Hardware Information:

  • Hardware Model: HP HP Notebook
  • Memory: 8.0 GiB
  • Processor: Intel® Core™ i3-5005U × 4
  • Graphics: Intel® HD Graphics 5500 (BDW GT2)
  • Graphics 1: HAINAN
  • Disk Capacity: 1.2 TB

Software Information:

  • Firmware Version: F.47
  • OS Name: Fedora Linux 39 (Workstation Edition)
  • OS Build: (null)
  • OS Type: 64-bit
  • GNOME Version: 45.5
  • Windowing System: Wayland
  • Kernel Version: Linux 6.8.4-200.fc39.x86_64

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the failure with sudo npm install -g @angular/cli on Fedora 39 using Node.js 20.12.0, then inspect the nodejs-cjs-module-lexer package and /usr/lib/node_modules/cjs-module-lexer/lexer.js. Done means npm can install packages without the externalized-builtin error.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, nodejs
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.