早午餐的 Phoenix 1.1.4 问题
Phoenix 1.1.4 issue with Brunch
正在尝试开始新的 Elixir/Phoenix 项目。无法克服该错误:
▶ mix phoenix.server
[info] Running Test.Endpoint with Cowboy using http on port 4000
05 Feb 16:32:57 - error: Initialization error - You probably need to execute `npm install` to install brunch plugins. Error: Cannot find module 'babel-runtime/helpers/interop-require-default'
at /home/vagrant/test/node_modules/brunch/lib/plugins.js:103:17
at Array.map (native)
at deps.filter.dependency.map (/home/vagrant/test/node_modules/brunch/lib/plugins.js:91:8)
at packages.filter.plugin.filter.plugins.map.plugin.filter.deps.filter.allPlugins.filter (/home/vagrant/test/node_modules/brunch/lib/plugins.js:110:19)
at Object.packages.filter.plugin.filter.plugins.map.plugin.filter.deps.filter.exports.init.teardownBrunch [as init] (/home/vagrant/test/node_modules/brunch/lib/plugins.js:133:20)
at /home/vagrant/test/node_modules/brunch/lib/watch.js:81:19
版本:
- 机器:Ubuntu 14.04 on Vagrant 1.7.4
- node -v : v4.2.6
- npm -v:2.14.12
- mix -v:混合 1.2.0
- 长生不老药-v:长生不老药 1.2.0
- 二郎 : 18
- 凤凰:1.1.4
项目内容package.json:
{
"repository": {
},
"dependencies": {
"babel-brunch": "~6.0.0",
"brunch": "~2.1.3",
"clean-css-brunch": "~1.8.0",
"css-brunch": "~1.7.0",
"javascript-brunch": "~1.8.0",
"uglify-js-brunch": "~1.7.0",
"phoenix": "file:deps/phoenix",
"phoenix_html": "file:deps/phoenix_html"
}
}
显然现在 Elixir 需要 node.js >=5.0.0
We can get node.js from the download page. When selecting a package to
download, it's important to note that Phoenix requires version 5.0.0
or greater.
curl -sL https://deb.nodesource.com/setup_5.x | sudo -E bash -
sudo apt-get install -y nodejs
rm node_modules -r
npm install .
解决了问题
正在尝试开始新的 Elixir/Phoenix 项目。无法克服该错误:
▶ mix phoenix.server
[info] Running Test.Endpoint with Cowboy using http on port 4000
05 Feb 16:32:57 - error: Initialization error - You probably need to execute `npm install` to install brunch plugins. Error: Cannot find module 'babel-runtime/helpers/interop-require-default'
at /home/vagrant/test/node_modules/brunch/lib/plugins.js:103:17
at Array.map (native)
at deps.filter.dependency.map (/home/vagrant/test/node_modules/brunch/lib/plugins.js:91:8)
at packages.filter.plugin.filter.plugins.map.plugin.filter.deps.filter.allPlugins.filter (/home/vagrant/test/node_modules/brunch/lib/plugins.js:110:19)
at Object.packages.filter.plugin.filter.plugins.map.plugin.filter.deps.filter.exports.init.teardownBrunch [as init] (/home/vagrant/test/node_modules/brunch/lib/plugins.js:133:20)
at /home/vagrant/test/node_modules/brunch/lib/watch.js:81:19
版本:
- 机器:Ubuntu 14.04 on Vagrant 1.7.4
- node -v : v4.2.6
- npm -v:2.14.12
- mix -v:混合 1.2.0
- 长生不老药-v:长生不老药 1.2.0
- 二郎 : 18
- 凤凰:1.1.4
项目内容package.json:
{
"repository": {
},
"dependencies": {
"babel-brunch": "~6.0.0",
"brunch": "~2.1.3",
"clean-css-brunch": "~1.8.0",
"css-brunch": "~1.7.0",
"javascript-brunch": "~1.8.0",
"uglify-js-brunch": "~1.7.0",
"phoenix": "file:deps/phoenix",
"phoenix_html": "file:deps/phoenix_html"
}
}
显然现在 Elixir 需要 node.js >=5.0.0
We can get node.js from the download page. When selecting a package to download, it's important to note that Phoenix requires version 5.0.0 or greater.
curl -sL https://deb.nodesource.com/setup_5.x | sudo -E bash -
sudo apt-get install -y nodejs
rm node_modules -r
npm install .
解决了问题