Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

build.sh fails in a fresh checkout #23

Closed
chr15m opened this issue Jul 26, 2019 · 4 comments · May be fixed by #24 or #26
Closed

build.sh fails in a fresh checkout #23

chr15m opened this issue Jul 26, 2019 · 4 comments · May be fixed by #24 or #26

Comments

@chr15m
Copy link

chr15m commented Jul 26, 2019

$ ./build.sh 

> poli-web-app@0.9.0 build /home/chrism/dev/poli/web-app
> react-scripts build

sh: 1: react-scripts: not found
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! poli-web-app@0.9.0 build: `react-scripts build`
npm ERR! spawn ENOENT
npm ERR! 
npm ERR! Failed at the poli-web-app@0.9.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/chrism/.npm/_logs/2019-07-26T03_16_34_384Z-debug.log
cp: cannot stat ‘build/*’: No such file or directory
@shzlw
Copy link
Owner

shzlw commented Jul 26, 2019

Step 2 in the build mentions that you need to run npm install first time. I didn't add it to build file on purpose.

@chr15m
Copy link
Author

chr15m commented Jul 26, 2019

Ok. Is the reason you didn't add it to build.sh because it slows down the build? If so would you accept a PR for a Makefile which would resolve this problem?

chr15m added a commit to chr15m/poli that referenced this issue Jul 26, 2019
Use make: `target/poli-0.9.0.jar' is up to date. to build. Only those dependencies which have changed will be built.
For example node_modules will only be installed if package.json has been changed or if it is missing.
Fixes shzlw#23
chr15m added a commit to chr15m/poli that referenced this issue Jul 26, 2019
Use `make` to build. Only those dependencies which have changed will be built.
For example `node_modules` will only be installed if package.json has been changed or if it is missing.
React app will only be built if web-app sources have been changed.

Fixes shzlw#23
@shzlw
Copy link
Owner

shzlw commented Jul 30, 2019

Thanks a lot for the PR! Unfortunately, I don't use make but I will check your makefile and improve the build script.

@chr15m
Copy link
Author

chr15m commented Jul 30, 2019

No worries!

@chr15m chr15m closed this as completed Jul 30, 2019
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants