Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
bobbingwide opened this issue May 28, 2021 · 4 comments

Comments

@bobbingwide
Copy link
Owner

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.
@bobbingwide
Copy link
Owner Author

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

> [email protected] dev C:\apache\htdocs\wordpress\wp-content\plugins\gutenberg-source
> npm run build:packages && concurrently "wp-scripts start" "npm run dev:packages"


> [email protected] prebuild:packages C:\apache\htdocs\wordpress\wp-content\plugins\gutenberg-source
> npm run clean:packages && lerna run build


> [email protected] 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/[email protected] 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/[email protected] build: `./bin/index.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @wordpress/[email protected] 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! [email protected] prebuild:packages: `npm run clean:packages && lerna run build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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! [email protected] 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 [email protected] 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

@bobbingwide
Copy link
Owner Author

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.

@bobbingwide
Copy link
Owner Author

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.

@bobbingwide
Copy link
Owner Author

bobbingwide commented May 28, 2021

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant