Skip to content

Test sb-debug-block with the changes for Gutenberg feature request 32309 #3

Open

Description

@bobbingwide

Requirement

Test sb-debug-block with the changes developed to fix Gutenberg feature request 32309.

Proposed solution

  • Develop the changes proposed in the issue
  • Build the solution
  • Test by using the block in the ThisIs and Fizzie themes.

Activity

  1. bobbingwide commented on May 28, 2021

    @bobbingwide
    OwnerAuthor

    Current status

    I'm currently unable to build Gutenberg. Results of npm run dev are below.
    Running npm ci and npm update has not resolved the problem.
    I'll have to try removing node_modules again.

    C:\apache\htdocs\wordpress\wp-content\plugins\gutenberg-source>npm run dev
    
    > gutenberg@10.7.1 dev C:\apache\htdocs\wordpress\wp-content\plugins\gutenberg-source
    > npm run build:packages && concurrently "wp-scripts start" "npm run dev:packages"
    
    
    > gutenberg@10.7.1 prebuild:packages C:\apache\htdocs\wordpress\wp-content\plugins\gutenberg-source
    > npm run clean:packages && lerna run build
    
    
    > gutenberg@10.7.1 clean:packages C:\apache\htdocs\wordpress\wp-content\plugins\gutenberg-source
    > rimraf "./packages/*/@(build|build-module|build-style)"
    
    lerna notice cli v3.22.1
    lerna info versioning independent
    lerna info Executing command in 2 packages: "npm run build"
    lerna ERR! npm run build exited 1 in '@wordpress/babel-preset-default'
    lerna ERR! npm run build stdout:
    
    > @wordpress/babel-preset-default@6.1.0 build C:\apache\htdocs\wordpress\wp-content\plugins\gutenberg-source\packages\babel-preset-default
    > ./bin/index.js
    
    
    lerna ERR! npm run build stderr:
    '.' is not recognized as an internal or external command,
    operable program or batch file.
    npm ERR! code ELIFECYCLE
    npm ERR! errno 1
    npm ERR! @wordpress/babel-preset-default@6.1.0 build: `./bin/index.js`
    npm ERR! Exit status 1
    npm ERR!
    npm ERR! Failed at the @wordpress/babel-preset-default@6.1.0 build script.
    npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
    npm WARN Local package.json exists, but node_modules missing, did you mean to install?
    
    npm ERR! A complete log of this run can be found in:
    npm ERR!     C:\Users\herb\AppData\Roaming\npm-cache\_logs\2021-05-28T12_01_05_269Z-debug.log
    
    lerna ERR! npm run build exited 1 in '@wordpress/babel-preset-default'
    lerna WARN complete Waiting for 1 child process to exit. CTRL-C to exit immediately.
    npm ERR! code ELIFECYCLE
    npm ERR! errno 1
    npm ERR! gutenberg@10.7.1 prebuild:packages: `npm run clean:packages && lerna run build`
    npm ERR! Exit status 1
    npm ERR!
    npm ERR! Failed at the gutenberg@10.7.1 prebuild:packages script.
    npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
    
    npm ERR! A complete log of this run can be found in:
    npm ERR!     C:\Users\herb\AppData\Roaming\npm-cache\_logs\2021-05-28T12_01_05_321Z-debug.log
    npm ERR! code ELIFECYCLE
    npm ERR! errno 1
    npm ERR! gutenberg@10.7.1 dev: `npm run build:packages && concurrently "wp-scripts start" "npm run dev:packages"`
    npm ERR! Exit status 1
    npm ERR!
    npm ERR! Failed at the gutenberg@10.7.1 dev script.
    npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
    
    npm ERR! A complete log of this run can be found in:
    npm ERR!     C:\Users\herb\AppData\Roaming\npm-cache\_logs\2021-05-28T12_01_05_357Z-debug.log
    
  2. bobbingwide commented on May 28, 2021

    @bobbingwide
    OwnerAuthor

    I'll have to try removing node_modules again.

    Deleting the node_modules folder and reinstalling didn't resolve the problem.
    I found the change that introduced the build step that's failing.
    WordPress/gutenberg#31279

    Changing packages/babel-preset-default/package.json to add node into the script.build
    seemed to resolve the problem.

    "scripts": {
    		"build": "node ./bin/index.js"
    	}
    

    Maybe I should associate node to the .js extension.

  3. bobbingwide commented on May 28, 2021

    @bobbingwide
    OwnerAuthor

    I'm currently unable to build Gutenberg. Results of npm run dev are below.

    npm run build also fails with the same message.

    The workaround in #3 (comment) applies to both npm run dev and npm run build.

  4. bobbingwide commented on May 28, 2021

    @bobbingwide
    OwnerAuthor

    Maybe I should associate node to the .js extension.

    When I run assoc .js and assoc .php I get the same result. Both extensions are associated to PhpStorm2019.3

    C:\apache\htdocs\wordpress\wp-content\plugins\sb-debug-block>assoc .php
    .php=PhpStorm2019.3
    

    And ftype PhpStorm2019.3 gives

    PhpStorm2019.3="C:\Program Files\JetBrains\PhpStorm 2019.3\bin\phpstorm64.exe" "%1"
    

    I'm actually running PhpStorm 2021.1.2. I don't suppose there's any harm in changing the association for .js files to node then.
    But I think it would be better to make it explicit in the package.json file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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