Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

256
Views
¿Qué significa el error "instalar\r" en Reactjs con Docker usando hilo?

Creé una aplicación Reactjs con la configuración de Docker. Estoy usando Windows 10. Después de compilar, el contenedor sigue reiniciando y produce errores en los registros:

Imagen acoplable

Imagen de registros

Imagen del navegador

 yarn run v1.22.5 error Command "install\r" not found. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. : not foundotup.sh: line 3: /var/www/bootup.sh: line 11: syntax error: unexpected end of file (expecting "then")

Dockerfile

 # pull official base image FROM node:12.20.0-alpine3.10 WORKDIR /var/www COPY package.json /var/www/ RUN yarn install COPY . /var/www/ # Install create-react-app package RUN yarn global add react-scripts EXPOSE 3000 ADD ./bootup.sh /var/www RUN cd /var/www RUN chmod +x /var/www/bootup.sh

docker-compose.yml

 version: '3.7' services: frontend: build: . restart: unless-stopped tty: true working_dir: /var/www/ ports: - '3002:3000' volumes: - '.:/var/www' - /var/www/node_modules environment: - CHOKIDAR_USEPOLLING=true yarn start command: /var/www/bootup.sh ${SSL_ON}

bootup.sh

 # Install Dependencies yarn install # Start the react app if [ "$1" == "true" ] then yarn start-https else yarn start fi

Intenté reiniciarlo, eliminé el contenedor, volví a clonar el repositorio, pero el problema sigue ocurriendo.

Cloné el repositorio en Ubuntu usando otra computadora portátil, ninguno de estos errores ocurre, solo en Windows. Si alguien tiene alguna idea de lo que esto significa, sería de gran ayuda.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Resolví este problema según el comentario de @HansKilian sobre los finales de línea. Seguí este enlace sobre cómo convertir el archivo bootup.sh con los finales de línea de estilo UNIX adecuados: https://support.nesi.org.nz/hc/en-gb/articles/218032857-Converting-from-Windows-style -a-finales-de-línea-estilo-UNIX

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!