Very slow to create an app / Size of created directory is huge
See original GitHub issueCan 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:
-
npm ls react-scripts
(if you haven’t ejected): -
node -v
: 4.7.0 -
npm -v
: 4.0.3 -
Operating system: Docker argon inside linux
-
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 ?
Issue Analytics
- State:
- Created 7 years ago
- Reactions:4
- Comments:5 (3 by maintainers)
Top GitHub Comments
Thanks for the quick and full response, I will tell students to use npm version 3 and do it before the next course. Indeed, the issues that you linked to are very revelant and it would be great to see them fixed.
can this be re-opened? On node 8.11.3, npm 5.6.0, Win7, it took 2332s Creating a new React app in [PATH]\react-marionette-angular.
Installing packages. This might take a couple of minutes. Installing react, react-dom, and react-scripts…
Success! Created react-marionette-angular at [PATH]\react-marionette-angular Inside that directory, you can run several commands:
It was much faster in npm 3.x, node 6.11.x win7