npm - Phoenix 1.1.4 issue with Brunch -
trying start new elixir/phoenix project. can't past error:
▶ mix phoenix.server [info] running test.endpoint cowboy using http on port 4000 05 feb 16:32:57 - error: initialization error - need execute `npm install` install brunch plugins. error: cannot find module 'babel-runtime/helpers/interop-require-default' @ /home/vagrant/test/node_modules/brunch/lib/plugins.js:103:17 @ array.map (native) @ deps.filter.dependency.map (/home/vagrant/test/node_modules/brunch/lib/plugins.js:91:8) @ packages.filter.plugin.filter.plugins.map.plugin.filter.deps.filter.allplugins.filter (/home/vagrant/test/node_modules/brunch/lib/plugins.js:110:19) @ 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) @ /home/vagrant/test/node_modules/brunch/lib/watch.js:81:19
versions:
- machine: ubuntu 14.04 on vagrant 1.7.4
- node -v : v4.2.6
- npm -v : 2.14.12
- mix -v : mix 1.2.0
- elixir -v : elixir 1.2.0
- erlang : 18
- phoenix : 1.1.4
contents of projects 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" } }
apparently elixir requires node.js >=5.0.0
we can node.js download page. when selecting package download, it's important note 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 .
fixed problem
Comments
Post a Comment