1

我试过跑

nexe --help

或者

nexe index.js

但它返回了这个错误:

Command 'nexe' not found, did you mean:

  command 'rexe' from snap rexe (0.7)
  command 'next' from deb mailutils-mh (1:3.7-2.1)
  command 'next' from deb mmh (0.4-2)
  command 'next' from deb nmh (1.7.1-6)
  command 'nex' from deb nvi (1.81.6-15build1)

See 'snap info <snapname>' for additional versions.

我正在使用Ubuntu系统。我该如何解决?

4

1 回答 1

0

解决方案

  • 首先,在本地卸载安装在系统上的nexe模块并移除package.json使用:
npm uninstall nexe -S

或者如果它是开发依赖项,请使用:

npm uninstall nexe -D -S

如果您在全局范围内安装它,请使用:

npm uninstall nexe -g
  • 现在使用sudo命令将包安装为全局包:
sudo npm i nexe -g
  • 完全安装后再次运行命令:
nexe --help

如果它给出帮助控制台输出,现在运行:

nexe index.js
于 2021-06-15T07:05:16.430 回答