Closed ghost closed 7 years ago
When I try to transpile my ES6 code, I got the error message saying that
SyntaxError: Couldn't transpile JS code: Error: Couldn't find preset "es2015" relative to directory "."
Then I try to solve this problem by using this solution
And I try to revise the code from "presets": ["es2015"] to "presets": ['babel-preset-es2015'].map(require.resolve)
"presets": ["es2015"]
"presets": ['babel-preset-es2015'].map(require.resolve)
And which was introduced from here
And it works
Thanks for reporting, and providing a solution! This is fixed by a152067bde6ecb4ebd123cc7be0d6f8d7498352e I also added the preset for es2016 and es2017 at the same time.
When I try to transpile my ES6 code, I got the error message saying that
Then I try to solve this problem by using this solution
And I try to revise the code from
"presets": ["es2015"]
to"presets": ['babel-preset-es2015'].map(require.resolve)
And which was introduced from here
And it works