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

Can't yarn build on M$ Win* Git Bash #40

Open
VincentTam opened this issue Oct 17, 2022 · 0 comments
Open

Can't yarn build on M$ Win* Git Bash #40

VincentTam opened this issue Oct 17, 2022 · 0 comments

Comments

@VincentTam
Copy link

image

The system complains "'BABEL_ENV' is not recognized as an internal or external command".

build: {
default: series(
'nps clean',
crossEnv(
`NODE_ENV=production ${concurrent.nps(
'build.umd',
'build.cjs',
'build.min',
)}`,
),
),
umd: 'BABEL_ENV=build rollup -c',
min: 'BABEL_ENV=build rollup -c --environment MIN',
cjs: 'BABEL_ENV=build rollup -c --environment TARGET:cjs',
},

This is similar magento/pwa-studio#898: the use of BABEL_ENV=build at the beginning of a command is fine on Unix, but not on M$ Win*. The following screenshot shows that the command works on WSL (Windows Subsystem for Linux)

image

The linked PR's author suggests adding the node.js package cross-env in the dependencies. Lacking knowledge in node.js, I'll leave that for others to think about.

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