error: This is probably not a problem with npm. There is likely additional logging output above

后端 未结 14 2257
温柔的废话
温柔的废话 2020-12-13 20:34

In my project, I\'m using Angular6 for the frontend. Now what I\'m trying to do is deploy my project which is in remote server into the actual server. I\'m using npm r

14条回答
  •  再見小時候
    2020-12-13 21:05

    Finally, I found a solution to this problem without reinstalling npm and I'm posting it because in future it will help someone, Most of the time this error occurs javascript heap went out of the memory. As the error says itself this is not a problem with npm. Only we have to do is

    instead of,

    npm  run build -prod
    

    extend the javascript memory by following,

    node --max_old_space_size=4096 node_modules/@angular/cli/bin/ng build --prod
    

提交回复
热议问题