我正在尝试将nodeJs安装到我的Ubuntu 14.04中以便使用GruntJs.
我已经阅读了Ubuntu不同的做法(问题?),所以这就是我为安装它而做的事情:
sudo apt-get install npm
sudo npm install -g grunt-cli
Run Code Online (Sandbox Code Playgroud)
在那之后打字咕噜我有错误:
/usr/bin/env: node: No such file or directory
Run Code Online (Sandbox Code Playgroud)
所以,我试过了:
curl -sL https://deb.nodesource.com/setup | sudo bash -
sudo apt-get install -y nodejs
sudo apt-get update
Run Code Online (Sandbox Code Playgroud)
再试一次,仍然得到错误,我试过:
sudo add-apt-repository https://launchpad.net/~chris-lea/+archive/node.js/
sudo apt-get install -y nodejs
Run Code Online (Sandbox Code Playgroud)
我有这样的信息:
nodejs is already the newest version.
0 to upgrade, 0 to newly install, 0 to remove and 3 not to upgrade.
Run Code Online (Sandbox Code Playgroud)
我确实尝试过清理,以防万一:
sudo apt-get autoremove
Run Code Online (Sandbox Code Playgroud)
但是没有,错误仍然存在:当我输入咕噜声时,我仍然会得到 /usr/bin/env: node: No such …
我在我的Homestead流浪盒上运行Laravel 5.4.我用npm install命令安装了所有npm依赖项.这没有产生任何错误.
在我的webpack.min.js文件中,我有:
const { mix } = require('laravel-mix');
/*
|--------------------------------------------------------------------------
| Mix Asset Management
|--------------------------------------------------------------------------
|
| Mix provides a clean, fluent API for defining some Webpack build steps
| for your Laravel application. By default, we are compiling the Sass
| file for the application as well as bundling up all the JS files.
|
*/
mix.js([
'resources/assets/plugins/jquery-1.11.3.min.js',
'resources/assets/plugins/bootstrap/js/bootstrap.min.js',
'resources/assets/js/main.js'
], 'public/js'
);
mix.combine([
'resources/assets/plugins/bootstrap/css/bootstrap.min.css',
'resources/assets/plugins/font-awesome/css/font-awesome.css',
'resources/assets/css/styles.css'
], 'public/css/all.css');
Run Code Online (Sandbox Code Playgroud)
当我想要运行时,npm …
我正在尝试运行我在我的Windows机器上构建的nodejs应用程序到我的Ubuntu Server 14.04.
当我尝试使用pm2 web或启动我的nodejs应用程序启动pm2 的web界面时,我已安装了nodejs和pm2 hovewer pm2 start myapp.js,它会抛出此错误:/usr/bin/env: node: No such file or directory
难道我做错了什么?
node.js ×3
elixir-mix ×1
express ×1
gruntjs ×1
laravel ×1
laravel-5 ×1
node-modules ×1
npm-install ×1
pm2 ×1
ubuntu ×1
webpack ×1