Couldn't find preset “es2015” relative to directory “web/static/js”

后端 未结 4 1340
别跟我提以往
别跟我提以往 2020-12-24 06:44

I\'m trying to build a vagrant server for dabbling with elixir and phoenix, but after installing all requirements and dependencies, and on running mix phoenix.server

相关标签:
4条回答
  • 2020-12-24 07:10

    I see that there is already an accepted answer here. I just encountered the exact same error, and tried the solution Chris posted above. It did not work for me, but based on the github issue link Chris posted above, I found a solution that worked for me.

    I found that you don't necessarily need to be using node v5.0+. I am using node 4.4.3 LTS, and things are working.

    npm install --save-dev babel-preset-es2015

    0 讨论(0)
  • 2020-12-24 07:16

    Please see the fix here: https://github.com/phoenixframework/phoenix/issues/1410

    1. Upgrade to node >= v5.0.0
    2. npm cache clean
    3. cd my_app
    4. rm -rf node_modules/
    5. npm install
    6. mix phoenix.server
    0 讨论(0)
  • 2020-12-24 07:16

    My solution which is great works:

    .pipe(babel({
        presets: [require('babel-preset-es2015')]
    }))
    

    Thanks!

    0 讨论(0)
  • 2020-12-24 07:25

    The accepted answer did not work for me.

    I had to remove the .babelrc in the parents directories of my app.

    0 讨论(0)
提交回复
热议问题