Error:
Sh: 1: the react - scripts: not found
NPM ERR! The file sh
NPM ERR! Code ELIFECYCLE
NPM ERR! Errno ENOENT
NPM ERR! The syscall spawn
NPM ERR! [email protected] build: ` react - scripts build `
NPM ERR! Spawn ENOENT
NPM ERR!
NPM ERR! Failed at the [email protected] 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!/root/. NPM/_logs/2018-06-19 T04_00_09_065Z - debug. The log
Dockerfile:
The FROM ubuntu
The Run apt - get the update
The Run apt - get the install curl - y
The Run curl - sL https://deb.nodesource.com/setup_10.x
Run apt - get the install - y nodejs
The Run apt - get the install - y git
The Run apt - get the install NPM - y
The Run apt - get the update - y
Run the git clone https://github.com/sdrafahl/TerraWeb.git
WORKDIR/TerraWeb
The Run NPM install - g - save NPM @ latest
.
CodePudding user response:
I had a similar problem, I try to change:"Start," the react - scripts start
"To:
"Start:"./node_modules/bin/restart - scripts start
"Part of the package in the script. In json.
I use the classic node based image, but it should be more or less the same. I am still investigating why NPM script in Docker runtime cannot parse response, welcome any further help: -)
CodePudding user response:
Hello, would you solve this problem, I also met recently