卸载项目中的ElectronJS

huangapple go评论70阅读模式
英文:

Uninstall ElectronJS from a project

问题

To delete ElectronJS from the current npm project, you can use the following commands:

  1. Remove Electron package:
npm uninstall electron
  1. Remove Electron from package.json:
    You will also need to remove the Electron reference from your package.json file manually. Open the package.json file and delete the line that mentions Electron under "dependencies" or "devDependencies."

After completing these steps, ElectronJS should be removed from your npm project.

英文:

My question is simple. How to delete electronjs from the current npm project. What commands need to be runned and what files need to be deleted?

I tried npm uninstall electron , but i can still see it in the package.json file.

答案1

得分: 1

  1. 再次尝试使用 npm uninstall electron。如果 electron 仍然在 package.json 中可见,请使用文本编辑器将其从该文件中删除。从 dependenciesdevDependencies 中删除它,不要忘记保存更改。

  2. 现在运行 npm install。这将根据 package.json 安装 node_modules 文件夹。

  3. 通过运行 npm list electron 命令来验证 electron 是否已删除。

这应该可以迅速解决您的问题。

英文:

Uninstall ElectronJS from Project

  1. Try npm uninstall electron again. If electron is still visible in package.json remove it from this file with a text editor. Delete it from dependencies and devDependencies and don't forget to save the changes.

  2. Run npm install now. This will install node_modules folder regarding package.json.

  3. Verify that electron is deleted by running npm list electron command.

This should solve your problem pretty quick.

huangapple
  • 本文由 发表于 2023年6月1日 01:39:25
  • 转载请务必保留本文链接:https://go.coder-hub.com/76376057.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定