Skip to content

Very slow to create an app / Size of created directory is huge #1243

Closed
@edi9999

Description

@edi9999

Can you reproduce the problem with latest npm?

Yes, with current npm version of 4.0.3

Description

It is very slow to create a new app, on a decent connection (~800kB/s). Approximately 5 minutes.

I am teaching a course about React in University, and wanted the students to use CRA for easily getting started, however, for 50% of the students, the install time was so slow (more than 30 minutes), that I told them to use codepen instead. I also tried by giving them a USB stick of the created base folder, but it took an enormous amount of time to unzip the folder on their windows machines (30minutes, for > 60000 files apparently).

$ docker run test/cra-app du -hs 'foobaz'
114M    foobaz

The size of the created folder is of 114M, this seems extremely big, couldn't we find a way to make this smaller ?

Expected behavior

The install to be faster / the directory size to be smaller

Actual behavior

The install is slow / the directory size is too big

Environment

Run these commands in the project folder and fill in their results:

  1. npm ls react-scripts (if you haven’t ejected):

  2. node -v: 4.7.0

  3. npm -v: 4.0.3

  4. Operating system: Docker argon inside linux

  5. Browser and version: NA

Reproducible Demo

You can use this Dockerfile for reproducing :

FROM node:argon
# Create app directory
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
RUN npm install -g npm
# Install app dependencies
RUN npm install -g create-react-app
RUN create-react-app foobaz

If they is no way to reduce the time of download and size of an app for now, do you have an idea of how I could give my students a way to have their base directory when I'm in linux, and they are on windows, without internet connection ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions