I've done a fresh install of a project, installed all composer dependencies with composer install.
Issued the command: yarn add @symfony/webpack-encore --dev
Setup webpack.config.js with the encore documentation as an example
Ran the command: ./node_modules/.bin/encore dev
And got the following errors:
/node_modules/@babel/core/lib/config/files/plugins.js:152
throw e;
^
Error: Cannot find module 'babel-preset-env' from '/home/user/git/project'
Tried installing babel-preset-env via yarn and ran encore dev command again, and got a failed to compile with 1 error message:
Module build failed (from ./node_modules/babel-loader/lib/index.js):
TypeError: Cannot read property 'bindings' of null
It's now @babel/preset-env rather than babel-preset-env.
Hey @galens!
I think I just answered you over on SymfonyCasts :). Delete the .babelrc file - that was leftover from the previous tutorial, and now causes issue (it references this outdated library). And we don't need this file anyways - Encore handles this detail automatically.
Cheers!
Most helpful comment
Hey @galens!
I think I just answered you over on SymfonyCasts :). Delete the
.babelrcfile - that was leftover from the previous tutorial, and now causes issue (it references this outdated library). And we don't need this file anyways - Encore handles this detail automatically.Cheers!