3

This is well documented and I have followed the instructions very carefully several times over. HOWEVER, every time I run the 'npm run deploy' command on a completely vanilla create-react-app install, it fails on my system with this error:-

C:\React\weather-app>npm run deploy

[email protected] predeploy C:\React\weather-app npm run build

npm WARN invalid config loglevel="notice"

[email protected] build C:\React\weather-app react-scripts build

Creating an optimized production build... Compiled successfully.

File sizes after gzip:

37.45 KB build\static\js\main.9959b426.js 224 B build\static\css\main.e94ed898.css

The project was built assuming it is hosted at /weather-app/. You can control this with the homepage field in your package.json.

The build folder is ready to be deployed. To publish it at https://my-github-username.github.io/weather-app, run:

npm run deploy

Find out more about deployment here:

(https://github.com/facebook/create-react-app/blob/master/packages/react-scripts/template/README.md#deployment)

[email protected] deploy C:\React\weather-app gh-pages -d build

error: cannot spawn sh: No such file or directory fatal: unable to fork

npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] deploy: gh-pages -d build npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] deploy 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\matt\AppData\Roaming\npm-cache_logs\2018-07-31T16_10_08_763Z-debug.log

This is driving me insane, PLEASE can anyone give me any pointers as to what's wrong with my local node, to prevent this script from running?

2

1 Answer 1

1

I have the same problem! But I think I found a work around at least for the time being...

  1. Make a production build with either npm run build or a failed npm run deploy
  2. Then run gh-page's script that was supposed to run gh-pages -d build

Good luck!

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.