为什么在我已经安装了'grib2json'后,它却未被识别为内部或外部命令?

我正在研究earth.null.school github代码,以在我的window 10系统中本地实现它。但是我正面临这个问题。

github code-我正在使用的代码。

demo-代码演示。

我有grib2json节点模块,但是window命令提示符仍然无法正常工作。我正在窗口10命令提示符下尝试以下命令。我正在使用它使用grib2json节点库将温度文件转换为json文件。

在上面的github代码中,我正在尝试以下window cmd命令。

>>> curl "http://nomads.ncep.noaa.gov/cgi-bin/filter_gfs.pl?file=gfs.t00z.pgrb2.1p00.f000&lev_10_m_above_ground=on&var_UGRD=on&var_VGRD=on&dir=%2Fgfs.${YYYYMMDD}00" -o gfs.t00z.pgrb2.1p00.f000
>>> grib2json -d -n -o current-wind-surface-level-gfs-1.0.json gfs.t00z.pgrb2.1p00.f000
grib2json

路径是\Desktop\earth\node_modules\grib2json。 和代码文件位于earth中。

C:\Users\Desktop\earth>grib2json -d -n -o current-wind-surface-level-gfs-1.0.json gfs.t00z.pgrb2.1p00.f000
'grib2json' is not recognized as an internal or external command,operable program or batch file.

我还按照注释部分的建议尝试了全局节点模块,再次没有任何反应。

C:\Users\Desktop\earth>npm i -grib2json
audited 382 packages in 3.024s
found 1 low severity vulnerability
  run `npm audit fix` to fix them,or `npm audit` for details

C:\Users\Desktop\earth>grib2json -d -n -o current-wind-surface-level-gfs-1.0.json gfs.t00z.pgrb2.1p00.f000
'grib2json' is not recognized as an internal or external command,operable program or batch file.

再次发生同样的事情。

C:\Users\Carthaginian\Desktop\earth>npm install -g grib2json
+ grib2json@1.0.2
added 3 packages from 2 contributors in 2.4s

C:\Users\Carthaginian\Desktop\earth>grib2json -d -n -o current-wind-surface-level-gfs-1.0.json gfs.t00z.pgrb2.1p00.f000
'grib2json' is not recognized as an internal or external command,operable program or batch file.
lytdydy 回答:为什么在我已经安装了'grib2json'后,它却未被识别为内部或外部命令?

我找到了解决方法-https://github.com/cambecc/grib2json,请在Windows 10 cmd提示符下找到以下命令并显示结果。

C:\Users\Desktop\earth>git clone https://github.com/cambecc/grib2json.git
Cloning into 'grib2json'...
remote: Enumerating objects: 322,done.
                                                                Receiving objects:  74% (239/322),28.01 KiBReceiving objects:  77% (248/322),28.01 KiB | 41.00 KiB/s
Receiving objects: 100% (322/322),52.70 KiB | 88.00 KiB/s,done.
Resolving deltas: 100% (105/105),done.

C:\Users\Desktop\earth>grib2json
'grib2json' is not recognized as an internal or external command,operable program or batch file.

C:\Users\Desktop\earth>cd grib2json

C:\Users\Desktop\earth\grib2json>mvn package
[INFO] Scanning for projects...
[INFO]
[INFO] ----------------------< net.nullschool:grib2json >----------------------
[INFO] Building grib2json 0.8.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-resources-plugin/2.6/maven-resources-plugin-2.6.pom
Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-resources-plugin/2.6/maven-resources-plugin-2.6.pom (8.1 kB at 1.8 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-plugins/23/maven-plugins-23.pom
|
|
|
|
Downloaded from central: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-compiler-javac/2.2/plexus-compiler-javac-2.2.pom (769 B at 678 B/s)
Downloading from central: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-compilers/2.2/plexus-compilers-2.2.pom
Downloaded from central: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-compilers/2.2/plexus-compilers-2.2.pom (1.2 kB at 917 B/s)
Downloading from central: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-container-default/1.5.5/plexus-container-default-1.5.5.pom
Downloaded from central: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-container-default/1.5.5/plexus-container-default-1.5.5.pom (2.8 kB at 613 B/s)
Downloading from central: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-utils/1.4.5/plexus-utils-1.4.5.pom
Downloaded from central: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-utils/1.4.5/plexus-utils-1.4.5.pom (2.3 kB at 1.5 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-classworlds/2.2.2/plexus-classworlds-2.2.2.pom
Downloaded from central: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-classworlds/2.2.2/plexus-classworlds-2.2.2.pom (4.0 kB at 4.4 kB/s)
|
|
|
|
[INFO] Reading assembly descriptor: src/assembly/assembly.xml
[INFO] Building tar: C:\Users\Desktop\earth\grib2json\target\grib2json-0.8.0-SNAPSHOT.tar.gz
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  24:38 min
[INFO] Finished at: 2019-11-04T14:34:13+05:30
[INFO] ------------------------------------------------------------------------
本文链接:https://www.f2er.com/3168936.html

大家都在问