When trying to deploy an application on Heroku, an error appears that the module was not found.

Hash: ae62203337abd2a15df9 Version: webpack 3.10.0 Time: 5889ms Asset Size Chunks Chunk Names build.js 122 kB 0 [emitted] main build.js.map 996 kB 0 [emitted] main build.js.gz 43.1 kB [emitted] ERROR in ./src/router/index.js Module not found: Error: Can't resolve '../components/index.vue' in '/tmp/build_98234cb35db9591e3ab6b0a8d6c11fd1/src/router' @ ./src/router/index.js 15:13-47 @ ./src/app.js @ multi ./src/app.js ERROR in ./src/router/index.js Module not found: Error: Can't resolve '../components/vueJS.vue' in '/tmp/build_98234cb35db9591e3ab6b0a8d6c11fd1/src/router' @ ./src/router/index.js 19:13-47 @ ./src/app.js @ multi ./src/app.js npm ERR! code ELIFECYCLE 

Although at the same time on the local machine, everything is going and running without problems. The configuration variables on Heroku are as follows:

  NPM_CONFIG_LOGLEVEL=error NPM_CONFIG_PRODUCTION=false NODE_VERBOSE=false NODE_ENV=production NODE_MODULES_CACHE=false 
  • Do you import / export all modules correctly? In the webpack config correctly indicated the path to build? Often such an error occurs precisely because of incorrectly prescribed paths. - Danil Chugayev

0