Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[DOCS] npm removal using make, no Makefile in project directory #7488

Closed
2 tasks done
avinal opened this issue May 8, 2024 · 5 comments · Fixed by #7502
Closed
2 tasks done

[DOCS] npm removal using make, no Makefile in project directory #7488

avinal opened this issue May 8, 2024 · 5 comments · Fixed by #7502
Labels
Documentation documentation related issue Priority 2 secondary priority issue

Comments

@avinal
Copy link
Contributor

avinal commented May 8, 2024

Is there an existing issue for this?

  • I have searched the existing issues

This is a CLI Docs Problem, not another kind of Docs Problem.

  • This is a CLI Docs Problem.

Description of Problem

I am trying to uninstall npm because I am getting this error message and no matter what command I try it is not working.

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

 1: 0x7fb2655f8fa4 node::builtins::BuiltinLoader::AddExternalizedBuiltin(char const*, char const*) [/lib64/libnode.so.115]
 2: 0x7fb2655f9193 node::builtins::BuiltinLoader::BuiltinLoader() [/lib64/libnode.so.115]
 3: 0x7fb26554e737 node::InitializePrimordials(v8::Local<v8::Context>) [/lib64/libnode.so.115]
 4: 0x7fb26554e868 node::GetPerContextExports(v8::Local<v8::Context>) [/lib64/libnode.so.115]
 5: 0x7fb26554e648 node::InitializePrimordials(v8::Local<v8::Context>) [/lib64/libnode.so.115]
 6: 0x7fb26554e940 node::InitializeMainContextForSnapshot(v8::Local<v8::Context>) [/lib64/libnode.so.115]
 7: 0x7fb26554e965 node::InitializeContext(v8::Local<v8::Context>) [/lib64/libnode.so.115]
 8: 0x7fb26554e9c3 node::NewContext(v8::Isolate*, v8::Local<v8::ObjectTemplate>) [/lib64/libnode.so.115]
 9: 0x7fb26567d024 node::NodeMainInstance::CreateMainEnvironment(node::ExitCode*) [/lib64/libnode.so.115]
10: 0x7fb26567d17b node::NodeMainInstance::Run() [/lib64/libnode.so.115]
11: 0x7fb2655e2999 node::Start(int, char**) [/lib64/libnode.so.115]
12: 0x7fb264a3d088  [/lib64/libc.so.6]
13: 0x7fb264a3d14b __libc_start_main [/lib64/libc.so.6]
14: 0x55b0be61e035 _start [node]
[1]    456973 IOT instruction (core dumped)  npm list -g --depth=0

I was following the guide to uninstall npm,

Or, if that fails, get the npm source code, and do:
```bash
sudo make uninstall
```

But there is no Makefile in the project repository root. Am I looking at the wrong repository or missing something.

Potential Solution

Update the docs with accurate info about removing npm.

Affected URL

https://docs.npmjs.com/cli/v10/using-npm/removal

@avinal avinal added Documentation documentation related issue Needs Triage needs review for next steps labels May 8, 2024
@reavessm
Copy link

reavessm commented May 8, 2024

I'm also seeing this error even when running npm --version. But I have npm installed via default Fedora (40) repos. Did you install this manually?

@wraithgar wraithgar added Priority 2 secondary priority issue and removed Needs Triage needs review for next steps labels May 8, 2024
@wraithgar
Copy link
Member

That is very outdated info in that doc file, it should be removed.

@avinal
Copy link
Contributor Author

avinal commented May 8, 2024

I'm also seeing this error even when running npm --version. But I have npm installed via default Fedora (40) repos. Did you install this manually?

I don't exactly remember, it was a long time ago. Everything was working fine until I upgraded to Fedora 40 and tried updating some packages.

@reavessm
Copy link

reavessm commented May 8, 2024

I was able to workaround/fix this by running sudo dnf remove nodejs-npm nodejs yarnpkg && sudo dnf install nodejs-npm nodejs yarnpkg. For whatever reason, dnf reinstall didn't work, but removing and installing did.

@avinal
Copy link
Contributor Author

avinal commented May 10, 2024

I will open a PR to remove the particular instruction.

avinal added a commit to avinal/npm-cli that referenced this issue May 10, 2024
- make uninstall is no longer possible using current source code
- Fixes npm#7488

Signed-off-by: Avinal Kumar <avinal.xlvii@gmail.com>
wraithgar pushed a commit that referenced this issue May 10, 2024
- make uninstall is no longer possible using current source code
- Fixes #7488

Signed-off-by: Avinal Kumar <avinal.xlvii@gmail.com>




## References

- Refer https://docs.npmjs.com/cli/v7/using-npm/removal#synopsis

Signed-off-by: Avinal Kumar <avinal.xlvii@gmail.com>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Documentation documentation related issue Priority 2 secondary priority issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants