hexo environment variable is deleted how do

This article is mainly about this in the case of path environment variable to be deleted, which make up the environment variables before they can re-use the hexo.

Two days ago, when the opencv configuration, accidentally environment variable "path" to the contents of this one overwritten, resulting in hard configuration environment variable before all gone (about how I discovered this, it really is unavailable appearance with hexo uploading blog, go online to search, I found the problem environment variables, we checked the path variable is really no more) was the only feeling is to directly replace the broken computer, however, The reality is poor, so they bite the bullet and come back with an environment variable.

Configuring the system environment variables

The first step is to environment variables and system-related plus back. In this step, I was by direct copy path environment variable on student computers, followed by check which does not exist on my computer, delete it. Of course, you can go online to find windows default path environment variable, this step is not too much about the narrative, then we mainly talk about environment variables which make up the hexo can be re-used.

Check nodejs

First open command window, the input node -v check node is available: if the node showing the version number, this step can be skipped; if the display node is not an internal or external command , then the node needs to configure the environment variables.

(In addition, hexo occur if you use a command such as hexo g ": node: No SUCH File or Directory / usr / bin / env" , but also the environment variable node problem does not exist)

Here is the solution:

Find the folder where the file nodejs, usually the default is based on the c drive, you can go to Program Files, Program Files (x86), Windows these folders to find it.

After finding, copying its path, for example I was C: \ Program Files \ NodeJS , it is added to the variable path environment (as shown below)

Check hexo

If you are having to use hexo g et hexo command conmand not found prompt, you need to configure hexo environment variable.

Here is the solution:

Find this same path on your computer C: \ the Users \ lenovo \ Blog \ hexo \ node_modules \ hexo \ bin (this path is under your hexo folders to ensure that after three \ node_modules \ hexo \ bin same It can be.

After finding it is added into the environment variable path, as shown.

Not surprisingly, then, after adding these two environment variables hexo ready for use, attention must resolve according to the order, first solve first, before tackling the second (I was the first to detect the second environment variable is missing the results after adding or unusable, and checked a long time to find out first). For additional questions, then according to their own Baidu it wrong reasons.

Guess you like

Origin www.cnblogs.com/fyunaru/p/11294468.html