create-guten-block
create-guten-block copied to clipboard
Module parse failed: Unexpected token while compiling block
Bug Report
Expected Behavior
I've created a fairly simple block that imports some features from the @wordpress package (example below).
However when I try to compile it fails with this error:
I already tried a bunch of stuff to overcome this, but none was successful.
- Eject the block and try to add the preset @babel/preset-react , @babel/preset-env, etc
- Update babel
- Change babel plugins options
- etc
Actual Behavior
(Write what happened. Please add screenshots!)
Steps to Reproduce
(Write your steps here:)
- Bootstrap a block
- npm install @wordpress/block-editor --save
- Import something from the @wordpress package
- Try to run:
npm start
-
node -v
: 12.8.1 -
npm -v
: 6.14.5
Then, specify:
- Operating system: Windows 10
- Browser and version (if relevant):
Possible Solution
Reproducible Demo
I'm attaching a zip file with a reproducible demo, not ejected. Link: https://drive.google.com/file/d/18UlVUdzxDwj8GdfQ3USN5kJ9oR1uVMMI/view?usp=sharing
(Paste the link to an example project and exact instructions to reproduce the issue.)