laravel - Ubuntu Laravel 上的 Gulp 安装错误

标签 laravel ubuntu laravel-5 gulp ubuntu-16.04

我跑npm install gulp在 Ubuntu 中。显示此错误:

我的服务器是 Ubuntu 16.04。

框架是 Laravel 5.6。

ERROR: npm is known not to run on Node.js v4.2.6
Node.js 4 is supported but the specific version you're running has
a bug known to break npm. Please update to at least 4.7.0 to use this
version of npm. You can find the latest release of Node.js at https://nodejs.org/

我跑node -v显示此消息:v4.2.6
我跑sudo apt-get install --only-upgrade nodejs显示此消息:
Reading package lists... Done
Building dependency tree       
Reading state information... Done
nodejs is already the newest version (9.11.1-1nodesource1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

如何解决这个问题呢?

最佳答案

试试这个.. 首先,完全卸载 nodejs 和 npm。

sudo apt remove nodejs npm

然后,重新安装它:
curl -sL https://deb.nodesource.com/setup_9.x | sudo -E bash -
sudo apt-get install -y nodejs

引用:https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions

关于laravel - Ubuntu Laravel 上的 Gulp 安装错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49705017/

相关文章:

php - 按结果分组为多维数组

php - URL::action 在 jquery ajax 中不起作用

linux - 如何正确使用prune? -type d 和 -type f 对修剪有不同的影响?

ubuntu - 如何解决 $DAEMON -t $DAEMON_OPT 权限被拒绝?

ubuntu - 如何使用 Linux Mint 18.3 KDE 挂载加密/主目录?

laravel 5.6 护照。 postman 加载无输出

php - 如何通过 PHP 单元测试避免竞争条件

javascript - 无法使用 AJAX 向 Laravel Controller 发送数据

php - 将用户分配到 Laravel 关系中的任何商店?

php - 将表单值插入数据库