jamesknelson / create-react-blog

Start and deploy your own statically rendered blog with create-react-app
https://create-react-blog.netlify.com/
MIT License
550 stars 69 forks source link

Build doesn't work in the typescript version #2

Closed umstek closed 5 years ago

umstek commented 5 years ago

Problem:
The line:
https://github.com/frontarm/create-react-blog/blob/8c0631c48c083768335eb4ccce9cc2d60467a7e9/template-ts/package.json#L28 tries to run a shell/cmd with node-ts instead of the actual navi-scripts.js itself.

Solution: Replacing the line with "build": "react-scripts build && ts-node -O {\\\"module\\\":\\\"commonjs\\\"} node_modules/navi-scripts/bin/navi-scripts.js build", fixes the problem.

jamesknelson commented 5 years ago

Could you let me know what platform you're using? This works fine for me on Mac OS 10.14, but perhaps the .bin directory is mac specific?

umstek commented 5 years ago

I'm using Windows. Didn't try on Linux yet. No, the bin directory exists; but the navi-scripts file there is a shell script (and cmd).

jamesknelson commented 5 years ago

I see, things seem to work differently on mac and windows. Thanks for submitting the fix! I've just merged it in.