简体   繁体   中英

How to uninstall node

I installed "Roots" theme for WordPress which comes with a "Grunt" build script which requires nodejs.

I deleted the theme via FTP but what's left is the theme folder along with a "node_modules" folder with what seems like thousands of files. Every time I delete the folder, it's like it recreates it with all of the files.

How can I uninstall nodejs/grunt?

The install process was to go to the theme's directory and use the command npm install then "grunt" and "grunt watch".

Thank you

Every Node.js package contains a package.json file which contains information about what all to install in the current folder.

So, if you don't want the node modules, just remove unwanted packages list from the dependencies section in your package.json and delete the node_modules folder.

If you want to use grunt watch command, you need grunt package with grunt-contrib-watch package and all these are in node_modules . If you delete these dependencies from package.json you can't use these commands any more.

More information about package.json can be found at : https://npmjs.org/doc/json.html

Hope this solves your issue.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM