未找到快速命令

2024-01-02

由于某种原因,在我的机器上全局安装 Express 后npm install -g express if I cd进入目录并尝试运行express 我收到以下错误:

express: command not found. 

即使我运行它sudo我仍然得到相同的输出。我已经尝试了多种不同的解决方案来解决这个问题,但没有任何效果。我已经通过安装了节点homebrewStack Overflow 上的一些线程表明可能存在问题,因此我完全卸载了 Node,并通过 nodejs.org 上的安装程序重新安装(我现在正在运行 v0.10.26),但问题仍然存在。

如果我进入我的/usr/local/lib/node_modulesExpress 在那里,但在 /usr/local/bin 中没有任何关于 Express 的内容。我不确定这是否是一个问题,但考虑到该目录中存在其他全局安装的节点包的二进制文件,我认为那里可能有问题。

这是我安装时得到的确切输出:

npm http GET https://registry.npmjs.org/express
npm http 304 https://registry.npmjs.org/express
npm http GET https://registry.npmjs.org/accepts/1.0.0
npm http GET https://registry.npmjs.org/type-is/1.0.0
npm http GET https://registry.npmjs.org/range-parser/1.0.0
npm http GET https://registry.npmjs.org/cookie/0.1.0
npm http GET https://registry.npmjs.org/fresh/0.2.2
npm http GET https://registry.npmjs.org/buffer-crc32/0.2.1
npm http GET https://registry.npmjs.org/send/0.2.0
npm http GET https://registry.npmjs.org/methods/0.1.0
npm http GET https://registry.npmjs.org/cookie-signature/1.0.3
npm http GET https://registry.npmjs.org/utils-merge/1.0.0
npm http GET https://registry.npmjs.org/merge-descriptors/0.0.2
npm http GET https://registry.npmjs.org/escape-html/1.0.1
npm http GET https://registry.npmjs.org/serve-static/1.0.1
npm http GET https://registry.npmjs.org/qs/0.6.6
npm http GET https://registry.npmjs.org/path-to-regexp/0.1.2
npm http GET https://registry.npmjs.org/parseurl/1.0.1
npm http GET https://registry.npmjs.org/debug
npm http 304 https://registry.npmjs.org/cookie/0.1.0
npm http 304 https://registry.npmjs.org/type-is/1.0.0
npm http 304 https://registry.npmjs.org/buffer-crc32/0.2.1
npm http 304 https://registry.npmjs.org/methods/0.1.0
npm http 304 https://registry.npmjs.org/accepts/1.0.0
npm http 304 https://registry.npmjs.org/range-parser/1.0.0
npm http 304 https://registry.npmjs.org/cookie-signature/1.0.3
npm http 304 https://registry.npmjs.org/fresh/0.2.2
npm http 304 https://registry.npmjs.org/serve-static/1.0.1
npm http 304 https://registry.npmjs.org/qs/0.6.6
npm http 304 https://registry.npmjs.org/utils-merge/1.0.0
npm http 304 https://registry.npmjs.org/merge-descriptors/0.0.2
npm http 304 https://registry.npmjs.org/escape-html/1.0.1
npm http 304 https://registry.npmjs.org/path-to-regexp/0.1.2
npm http 304 https://registry.npmjs.org/parseurl/1.0.1
npm http 304 https://registry.npmjs.org/debug
npm http 304 https://registry.npmjs.org/send/0.2.0
npm http GET https://registry.npmjs.org/mime
npm http GET https://registry.npmjs.org/send/0.1.4
npm http GET https://registry.npmjs.org/mime
npm http GET https://registry.npmjs.org/negotiator
npm http 304 https://registry.npmjs.org/mime
npm http 304 https://registry.npmjs.org/mime
npm http 304 https://registry.npmjs.org/send/0.1.4
npm http GET https://registry.npmjs.org/range-parser/0.0.4
npm http GET https://registry.npmjs.org/fresh/0.2.0
npm http 304 https://registry.npmjs.org/negotiator
npm http 304 https://registry.npmjs.org/range-parser/0.0.4
npm http 304 https://registry.npmjs.org/fresh/0.2.0
[email protected] /cdn-cgi/l/email-protection /usr/local/lib/node_modules/express
├── [email protected] /cdn-cgi/l/email-protection
├── [email protected] /cdn-cgi/l/email-protection
├── [email protected] /cdn-cgi/l/email-protection
├── [email protected] /cdn-cgi/l/email-protection
├── [email protected] /cdn-cgi/l/email-protection
├── [email protected] /cdn-cgi/l/email-protection
├── [email protected] /cdn-cgi/l/email-protection
├── [email protected] /cdn-cgi/l/email-protection
├── [email protected] /cdn-cgi/l/email-protection
├── [email protected] /cdn-cgi/l/email-protection
├── [email protected] /cdn-cgi/l/email-protection
├── [email protected] /cdn-cgi/l/email-protection
├── [email protected] /cdn-cgi/l/email-protection
├── [email protected] /cdn-cgi/l/email-protection ([email protected] /cdn-cgi/l/email-protection)
├── [email protected] /cdn-cgi/l/email-protection ([email protected] /cdn-cgi/l/email-protection)
├── [email protected] /cdn-cgi/l/email-protection ([email protected] /cdn-cgi/l/email-protection)
└── [email protected] /cdn-cgi/l/email-protection ([email protected] /cdn-cgi/l/email-protection, [email protected] /cdn-cgi/l/email-protection)

随着 Express 4.0.0 的发布,您似乎需要做sudo npm install -g express-generator.

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

未找到快速命令 的相关文章

随机推荐

  • 使用 mysql-proxy 操作登录信息

    是否可以在 mysql proxy 的 lua 脚本中拦截和更改登录信息 例如 如果用户像这样访问代理 mysql h localhost P 4040 u bob D orders p 我希望连接不仅重定向到后端服务器 而且还更改用户名
  • 如何将“2021-01-19T16:20:04+0000”解析为 time.Time

    我已经尝试过以下格式 应该可以捕获 0000我读到的时区偏移量https golang org pkg time pkg constants https golang org pkg time pkg constants ts err ti
  • 根据 Woocommerce 中的每日时间范围对特定产品进行折扣

    在我的 WooCommerce 网站上 我正在尝试举办 特别午餐 每日活动 这意味着 从 11 00 到 15 00 特定产品将因 午餐特惠 每日活动而打折 我希望这个 特别午餐 活动能够在一周的每一天重复发生 如何才能实现这一目标 我在网
  • C++:创建未初始化的占位符变量而不是默认对象

    我现在正从 Java 转向 C 每当 Java 中常用的概念不能直接映射到 C 时 我就会遇到一些困难 例如 在 Java 中我会这样做 Fruit GetFruit String fruitName Fruit fruit if frui
  • 如何解决将 Java 8 代码迁移到 Java 11 时的依赖性和包问题

    我正在准备将我团队的整个项目组合迁移到 Java 11 所有应用程序均基于多年来内部开发的框架 其中某些部分已有 12 年以上的历史 我已遵循中的建议这个帖子 https winterbe com posts 2018 08 29 migr
  • Hibernate 如何在提交事务之前对乐观锁进行行版本检查

    当在提交当前事务之前hibernate检查行的版本时 它应该发出一条sqlselect用于获取行的语句 假设发出后select语句 hibernate 发现行版本没有更改 因此它应该继续提交事务 我想知道 hibernate 如何确保在选择
  • 如何卸载特定版本的 NuGet 包?

    不知何故 我的一个项目中有同一个 NuGet 包的两个版本 有没有办法卸载该软件包的特定版本 我试过了Uninstall Package name 进而Install Package name 尽管这似乎保留了两个版本 这导致我的代码出现问
  • 在 QLabel 上显示 12 位双精度型或整数,而不是 3.23223e+9

    C 正在显示一个数字3232235975 on QLabel as 3 23223e 9 同时QCustomPlot轴为3 23223 10 9 我不涉及流 例如std cout 因此std setprecision不适合我的情况 我实际上
  • 如何使用 Python Pandas 处理多级数据?

    我一直在尝试获取一些多级数据的数据 我的初始数据如下所示 使用 python 脚本我获取这些数据 df pd read csv path header 0 1 读取后的数据 Name Unnamed 1 level 0 Address Un
  • #shadow-root 是什么,为什么它在我的 font Awesome 类上不显示任何内容? [复制]

    这个问题在这里已经有答案了 为什么 Shadow root 样式在我的上不显示任何内容 fa xxx课程 影子根的东西将我使用的类添加到显示无堆中 但仅添加我添加的特定类 我使用 PHP 来包含导航 页脚等 但这些不受它的影响 例如 它在我
  • 具有自签名证书的 https iOS

    我有一台带有自签名证书的服务器 我想以 https 形式将我的设备与服务器连接 我听说我必须接受这种联系 但我不知道怎么办 我有一个自签名证书 因为它是测试服务器 但我想用https形式访问 当我尝试使用 https 访问时出现错误 SUR
  • 装箱暴力法

    我需要制作解决装箱问题的程序 但我已经制作了首次拟合和贪婪算法 但我的讲师说在某些情况下它不会找到问题的最小解决方案 所以我决定尝试暴力破解 但我不知道它应该如何检查所有可能的解决方案 所以是的 有人可以向我解释一下或者给出伪代码什么的 我
  • 如何找到二进制文件的长度

    我有一个大小 2 的二进制文件 但我想将所有数据读入一个向量 但我不知道如何找到该二进制数据的总长度 f lt file a bin rb readBin f integer size 2 n Just use file info a bi
  • Rails 3/ Git/ Bundler Fatal 无法解析对象

    尝试捆绑安装时 我收到以下错误 Fatal could not parse object 8c11dd Git error command git reset hard 8c11dd If this error persists you c
  • 如何在 C++11 中创建线程对象数组?

    我想学习如何使用新的 C 标准库创建多个线程并将它们的句柄存储到数组中 我怎样才能启动一个线程 我看到的示例使用构造函数启动线程 但如果我使用数组 则无法调用构造函数 include
  • Python 正则表达式:异或运算符

    假设我有这样的字符串 DT NN IN NN DT RB JJ NN DT JJ JJ NN DT RB RB NN NN DT RB RB 所以 我有一个字符串列表 list DT NN IN NN DT RB JJ NN DT JJ J
  • std::map 的变量模板 + 通用 lambda

    An C 14 变量模板的答案 目的是什么 有使用示例吗 https stackoverflow com a 21162680 1508519提出了一个变量模板 泛型 lambda 的使用示例 如下所示 void some func tem
  • 当快速加载选项打开且最大插入提交大小设置为零时,SSIS 如何重定向 OLEDB 目标中的行

    我正在使用启用快速加载的 OLEDB 目标 在错误输出中 有 3 个选项 失败组件 忽略失败 和 重定向 如果我选 择 重定向 它会显示启用 快速加载 选项的 OLEDB 无法重定向 是否有其他方法来处理该错误这些类型的 Oledb 目标
  • 我的第一个表值函数和游标

    我有这样的疑问 SELECT name lastname FROM contestant WHERE name John AND lastname Smith 我从上面的查询中得到了几个结果 我需要将它们用于以下查询 SELECT name
  • 未找到快速命令

    由于某种原因 在我的机器上全局安装 Express 后npm install g express if I cd进入目录并尝试运行express 我收到以下错误 express command not found 即使我运行它sudo我仍然