typescript - Angular 4 can't ng build get 'ERROR in multi script-loader' -


when try run sudo ng build --prod --env=prod --aot=false, build stops @ 92% chunk asset optimization , following error message:

error in multi script-loader!./node_modules/jquery/dist/jquery.js script-loader!./node_modules/tether/dist/js/tether.js script-loader!./node_modules/bootstrap/dist/js/bootstrap.js script-loader!./node_modules/masonry-layout/dist/masonry.pkgd.js module not found: error: can't resolve '/home/ubuntu/teller-install/app/teller-app/node_modules/jquery/dist/jquery.js' in '/home/ubuntu/teller-install/app/teller-app/node_modules/@angular/cli/models/webpack-configs' resolve '/home/ubuntu/teller-install/app/teller-app/node_modules/jquery/dist/jquery.js' in '/home/ubuntu/teller-install/app/teller-app/node_modules/@angular/cli/models/webpack-configs'   using description file: /home/ubuntu/teller-install/app/teller-app/node_modules/@angular/cli/package.json (relative path: ./models/webpack-configs)     field 'browser' doesn't contain valid alias configuration   after using description file: /home/ubuntu/teller-install/app/teller-app/node_modules/@angular/cli/package.json (relative path: ./models/webpack-configs)     using description file: /home/ubuntu/teller-install/app/teller-app/package.json (relative path: ./node_modules/jquery/dist/jquery.js)       no extension         field 'browser' doesn't contain valid alias configuration         /home/ubuntu/teller-install/app/teller-app/node_modules/jquery/dist/jquery.js doesn't exist       .ts         field 'browser' doesn't contain valid alias configuration         /home/ubuntu/teller-install/app/teller-app/node_modules/jquery/dist/jquery.js.ts doesn't exist       .js         field 'browser' doesn't contain valid alias configuration         /home/ubuntu/teller-install/app/teller-app/node_modules/jquery/dist/jquery.js.js doesn't exist       directory         /home/ubuntu/teller-install/app/teller-app/node_modules/jquery/dist/jquery.js doesn't exist [/home/ubuntu/teller-install/app/teller-app/node_modules/jquery/dist/jquery.js] [/home/ubuntu/teller-install/app/teller-app/node_modules/jquery/dist/jquery.js.ts] [/home/ubuntu/teller-install/app/teller-app/node_modules/jquery/dist/jquery.js.js] [/home/ubuntu/teller-install/app/teller-app/node_modules/jquery/dist/jquery.js]  @ multi script-loader!./node_modules/jquery/dist/jquery.js script-loader!./node_modules/tether/dist/js/tether.js script-loader!./node_modules/bootstrap/dist/js/bootstrap.js script-loader!./node_modules/masonry-layout/dist/masonry.pkgd.js error in multi script-loader!./node_modules/jquery/dist/jquery.js script-loader!./node_modules/tether/dist/js/tether.js script-loader!./node_modules/bootstrap/dist/js/bootstrap.js script-loader!./node_modules/masonry-layout/dist/masonry.pkgd.js module not found: error: can't resolve '/home/ubuntu/teller-install/app/teller-app/node_modules/tether/dist/js/tether.js' in '/home/ubuntu/teller-install/app/teller-app/node_modules/@angular/cli/models/webpack-configs' resolve '/home/ubuntu/teller-install/app/teller-app/node_modules/tether/dist/js/tether.js' in '/home/ubuntu/teller-install/app/teller-app/node_modules/@angular/cli/models/webpack-configs'   using description file: /home/ubuntu/teller-install/app/teller-app/node_modules/@angular/cli/package.json (relative path: ./models/webpack-configs)     field 'browser' doesn't contain valid alias configuration   after using description file: /home/ubuntu/teller-install/app/teller-app/node_modules/@angular/cli/package.json (relative path: ./models/webpack-configs)     using description file: /home/ubuntu/teller-install/app/teller-app/package.json (relative path: ./node_modules/tether/dist/js/tether.js)       no extension         field 'browser' doesn't contain valid alias configuration         /home/ubuntu/teller-install/app/teller-app/node_modules/tether/dist/js/tether.js doesn't exist       .ts         field 'browser' doesn't contain valid alias configuration         /home/ubuntu/teller-install/app/teller-app/node_modules/tether/dist/js/tether.js.ts doesn't exist       .js         field 'browser' doesn't contain valid alias configuration         /home/ubuntu/teller-install/app/teller-app/node_modules/tether/dist/js/tether.js.js doesn't exist       directory         /home/ubuntu/teller-install/app/teller-app/node_modules/tether/dist/js/tether.js doesn't exist [/home/ubuntu/teller-install/app/teller-app/node_modules/tether/dist/js/tether.js] [/home/ubuntu/teller-install/app/teller-app/node_modules/tether/dist/js/tether.js.ts] [/home/ubuntu/teller-install/app/teller-app/node_modules/tether/dist/js/tether.js.js] [/home/ubuntu/teller-install/app/teller-app/node_modules/tether/dist/js/tether.js]  @ multi script-loader!./node_modules/jquery/dist/jquery.js script-loader!./node_modules/tether/dist/js/tether.js script-loader!./node_modules/bootstrap/dist/js/bootstrap.js script-loader!./node_modules 

/masonry-layout/dist/masonry.pkgd.js

does know why happening? can build fine in dev environment error happens on production environment.

thanks


Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -