Speeding up the npm install

前端 未结 8 2059
忘掉有多难
忘掉有多难 2021-02-01 14:54

I am trying to speed up the npm install during the build process phase. My package.json has the list of packages pretty much with locked revisions in it. I\'ve also configured t

8条回答
  •  名媛妹妹
    2021-02-01 15:29

    You could also include your node_modules folder inside your repository (you are probably using git), and just npm rebuild (which works cross platform) on build/deploy processes, and is pretty fast.

    This would also give you the benefit of full control over all your dependencies (I know that's what shrinkwrap usually should be used for)

    Edit:

    Also you can set the progress flag to false to increase your speed by at least 20%. This works only with npm@v3.x.x, and there will be hopefully fixes for that soon (see second link)

    npm set progress=false
    
    • Tweet about finding
    • Github Issue Cause identification

提交回复
热议问题