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

Build fails using PowerShell or WSL on Windows 10 #32258

Closed
carolinan opened this issue May 27, 2021 · 3 comments
Closed

Build fails using PowerShell or WSL on Windows 10 #32258

carolinan opened this issue May 27, 2021 · 3 comments
Labels
[Type] Build Tooling Issues or PRs related to build tooling [Type] Help Request Help with setup, implementation, or "How do I?" questions.

Comments

@carolinan
Copy link
Contributor

carolinan commented May 27, 2021

Description

With current trunk I get the following error when I try to use npm run dev or npm run build

Powershell

> [email protected] clean:packages D:\reviewdock\wp-app\wp-content\plugins\gutenberg
> 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 D:\reviewdock\wp-app\wp-content\plugins\gutenberg\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.

Node.js v14.17.0.
NPM 6.14.11

WSL:

> [email protected] clean:packages /mnt/d/reviewdock/wp-app/wp-content/plugins/gutenberg
> 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 /mnt/d/reviewdock/wp-app/wp-content/plugins/gutenberg/packages/babel-preset-default
> ./bin/index.js


lerna ERR! npm run build stderr:
/usr/bin/env: ‘node\r’: No such file or directory
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! @wordpress/[email protected] build: `./bin/index.js`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the @wordpress/[email protected] build script.
@carolinan carolinan changed the title Build fails using PowerShell on Windows 10 Build fails using PowerShell or WSL on Windows 10 May 27, 2021
@carolinan carolinan added [Type] Build Tooling Issues or PRs related to build tooling [Type] Help Request Help with setup, implementation, or "How do I?" questions. labels May 28, 2021
@manooweb
Copy link
Contributor

A temporary workaround I also used bobbingwide/sb-debug-block#3 (comment)
See our discussions on slack https://wordpress.slack.com/archives/C02QB2JS7/p1622216988152500

@aristath
Copy link
Member

A related PR was merged in #32329.
If the fix is confirmed then we can close this one 👍

@gziolo
Copy link
Member

gziolo commented Jun 7, 2021

I think that #32329 should fix it, we use a similar approach in other places:

"build:php": "node bin/create-php-parser.js"

We can always reopen when necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Build Tooling Issues or PRs related to build tooling [Type] Help Request Help with setup, implementation, or "How do I?" questions.
Projects
None yet
Development

No branches or pull requests

4 participants