英文:
Uninstall ElectronJS from a project
问题
To delete ElectronJS from the current npm project, you can use the following commands:
- Remove Electron package:
npm uninstall electron
- Remove Electron from package.json:
You will also need to remove the Electron reference from yourpackage.jsonfile manually. Open thepackage.jsonfile 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
-
再次尝试使用
npm uninstall electron。如果electron仍然在package.json中可见,请使用文本编辑器将其从该文件中删除。从dependencies和devDependencies中删除它,不要忘记保存更改。 -
现在运行
npm install。这将根据package.json安装node_modules文件夹。 -
通过运行
npm list electron命令来验证electron是否已删除。
这应该可以迅速解决您的问题。
英文:
Uninstall ElectronJS from Project
-
Try
npm uninstall electronagain. Ifelectronis still visible inpackage.jsonremove it from this file with a text editor. Delete it fromdependenciesanddevDependenciesand don't forget to save the changes. -
Run
npm installnow. This will installnode_modulesfolder regardingpackage.json. -
Verify that
electronis deleted by runningnpm list electroncommand.
This should solve your problem pretty quick.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。


评论