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

Building from source on Windows 10 produces 2 errors #92

Open
shaneknysh opened this issue Jan 17, 2022 · 4 comments
Open

Building from source on Windows 10 produces 2 errors #92

shaneknysh opened this issue Jan 17, 2022 · 4 comments

Comments

@shaneknysh
Copy link

Building from source on windows throws 2 errors.

First
yarn install

[4/4] Building fresh packages...
$ cp node_modules/pagedjs/dist/paged.polyfill.js public && cp -r node_modules/katex/dist/ public/katex && cp node_modules/markdown-it-texmath/css/texmath.css public/katex
'cp' is not recognized as an internal or external command,
operable program or batch file.

I edited the package.json replacing cp with copy but received a different error. I reverted and ran the command via WSL

Second
yarn dist

$ INLINE_RUNTIME_CHUNK=false react-scripts build
'INLINE_RUNTIME_CHUNK' is not recognized as an internal or external command, 'INLINE_RUNTIME_CHUNK' is not recognized as an internal or external command

Any advice would be appreciated.

@mb21
Copy link
Owner

mb21 commented Jan 18, 2022

Hello! Yes, WSL seems the right way to go... I'm surprised it doesn't work out of the box... are you using WSL 2.0? which shell does it have? bash, or?

This:

INLINE_RUNTIME_CHUNK=false react-scripts build

simply sets the INLINE_RUNTIME_CHUNK environment variable when running the command react-scripts build, but seems the shell you're running in doesn't know that syntax...

@shaneknysh
Copy link
Author

shaneknysh commented Jan 18, 2022 via email

@mb21
Copy link
Owner

mb21 commented Jan 19, 2022

I have the INLINE_RUNTIE_CHUNK errorI have it 95% solved using a cross-env package

that sounds promising! INLINE_RUNTIE_CHUNK is for https://create-react-app.dev/docs/advanced-configuration/

then try to add the css changes to the option screen and request a new PR
for that.

let's discuss/track that in #93

@shaneknysh
Copy link
Author

I added the cross env package as a dev dependency and changed the command to

"build": "cross-env INLINE_RUNTIME_CHUNK=false react-scripts build",

it fixes the INLINE_RUNTIME_CHUNK error - but I can't test the mac build or -mlw flag.

still working on the cp/copy error, I will work on it this weekend and hopefully have a PR ready.

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

2 participants