Skip to content

Several build errors #3

@Elschnuppero

Description

@Elschnuppero

In a fresh installation of the plugin i get several build errors:

[email protected] dev C:\xxx\wp-content\plugins\how-to-gutenberg-plugin-master
cross-env BABEL_ENV=default webpack --watch
Webpack is watching the files…
Hash: 92ab71e04b3c917dae58
Version: webpack 3.11.0
Time: 463ms
                       Asset     Size  Chunks             Chunk Names
./assets/js/editor.blocks.js  7.73 kB       0  [emitted]  ./assets/js/editor.blocks
   [0] ./blocks/index.js 153 bytes {0} [built]
   [1] ./blocks/i18n.js 50 bytes {0} [built]
   [2] ./blocks/register-block-type/index.js 960 bytes {0} [built] [failed] [1 error]
   [3] ./blocks/demo/index.js 1.24 kB {0} [built] [failed] [1 error]

ERROR in ./blocks/demo/index.js
Module build failed: SyntaxError: C:/xxx/wp-content/plugins/how-to-gutenberg-plugin-master/blocks/demo/index.js: Unexpected token (46:16)

  44 |             const onChangeMessage = message => { setAttributes( { message } ) };
  45 |             return (
> 46 |                 <div className={ className }>
     |                 ^
  47 |                     <h2>{ __( 'Call to Action', 'jsforwphowto' ) }</h2>
  48 |                     <RichText
  49 |                         tagName="div"

 @ ./blocks/index.js 10:0-17

ERROR in ./blocks/register-block-type/index.js
Module build failed: SyntaxError: C:/xxx/wp-content/plugins/how-to-gutenberg-plugin-master/blocks/register-block-type/index.js: Unexpected token (34:20)

  32 |
  33 | // Create variable for block header since using it twice
> 34 | const blockHeader = <h2>{ __( 'registerBlockType Explained', 'jsforwphowto' ) }</h2>;
     |                      ^
  35 |
  36 |
  37 | /**

 @ ./blocks/index.js 9:0-32

NPM runs on 5.6.0 and Node on 8.11.3.
Any idea?

Edit: Sorry for the terrible code display.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions