Closed carlosvega closed 1 year ago
I'm also having trouble setting up Babel for the first time and seeing the same error.
Any news on this?
I managed to fix this in the following way:
Install the following packages globally with npm install -g @babel/cli@7.19.3 @babel/core@7.20.5
├── @babel/cli@7.19.3
├── @babel/core@7.20.5
For local npm packages, install "@babel/preset-env": "^7.20.2"
Them in python, for Flask-assets 2.0 and webassets 2.0, do.
from flask_assets import Bundle
from webassets.filter import get_filter
import os
babel = get_filter(
"babel",
extra_args=[
"--plugins",
"./<project_name>/static/vendor/node_modules/@babel/plugin-transform-spread",
]
)
Change the path accordingly. In my case the issue was with plugin-transform-spread
that has also been included inside @babel package.
Hi,
since I use version two I'm getting the following error:
I use babel-preset-env 1.7.0 and babel-cli@6.26.0 I'm not sure how to address, any fix? Should I use babel 7? Thanks