angular-cli: ERROR in multi script-loader after updating to angular-cli 1.0.0

Bug Report or Feature Request (mark with an x)

- [ x] bug report -> please search issues before submitting
- [ ] feature request

Versions.

@angular/cli: 1.0.0 node: 6.10.1 os: win32 x64 @angular/common: 4.0.0 @angular/compiler: 4.0.0 @angular/core: 4.0.0 @angular/forms: 4.0.0 @angular/http: 4.0.0 @angular/platform-browser: 4.0.0 @angular/platform-browser-dynamic: 4.0.0 @angular/router: 4.0.0 @angular/cli: 1.0.0 @angular/compiler-cli: 4.0.0

Repro steps.

Added “scripts”: [ “…/node_modules/jquery/dist/jquery.js” ] to apps[0] in .angular-cli.json to include 3rd party scripts. When I run ng build I get:

ERROR in multi script-loader!./~/jquery/dist/jquery.js script-loader

Before updating to angular-cli 1.0.0 it worked.

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 6
  • Comments: 39 (1 by maintainers)

Most upvoted comments

use bootstrap loader … I was having same issue resolved it. run following commands.

  1. npm install --save resolve-url-loader --dev
  2. npm i --save-dev bootstrap@next bootstrap-loader tether jquery

I had the same issue. But I have solved it. Main error is in the scripts and css which are coming from the ‘node_modules’ folder. Go to ‘.angular-cli.json’ file and delete all ‘node_modules’ files and manually type the path of your all SCRIPTS and CSS …

Thanks

Closing as this seems to be a dependency problem that goes away when reinstalling dependencies (and making sure the paths are correct).

@shaadh Could I ask you to elaborate how you fixed this issue? Do you mean delete all styles and scripts that reference files in node_modules? If so what do I replace them with?

Not fixed at all. I just upgraded my project to @angular/cli and now every script will not load. No paths have changed.

ERROR in multi script-loader!C:/~/phaser-ce/build/phaser.js script-loader!./~/phaser-ce/build/box2d-plugin-full.js

package.json “scripts”: [ “…/node_modules/phaser-ce/build/phaser.js”, ], What should the path be?

I had the same error. But, was my fault, I didn’t install bootstrap with --save option. Tha correct way: npm install --save bootstrap@next

"scripts": [ "assets/js/jquery-1.10.2.min.js", "assets/js/bootstrap.min.js", ]

ERROR in multi script-loader!./src/assets/js/jquery-1.10.2.min.js script-loader!./src/assets/js/bootstrap.min.js

I do yarn upgrade and it’s works

same issue

[INFO] ERROR in multi script-loader!./~/jquery/dist/jquery.min.js script-loader!./~/moment/min/moment.min.js script-loader!./~/bootstrap/dist/js/bootstrap.min.js script-loader!./~/admin-lte/dist/js/app.min.js script-loader!./~/fullcalendar/dist/fullcalendar.min.js script-loader!./~/fullcalendar/dist/locale/fr.js script-loader!./~/mapbox-gl/dist/mapbox-gl.js script-loader!./~/ng2-bs3-modal/bundles/ng2-bs3-modal.min.js script-loader!./~/ng2-bootstrap/bundles/ng2-bootstrap.umd.min.js [INFO] Module not found: Error: Can't resolve '/home/maryo/dev/project/pg2/spg22/node_modules/ng2-bootstrap/bundles/ng2-bootstrap.umd.min.js' in '/home/maryo/dev/project/pg2/spg22' [INFO] @ multi script-loader!./~/jquery/dist/jquery.min.js script-loader!./~/moment/min/moment.min.js script-loader!./~/bootstrap/dist/js/bootstrap.min.js script-loader!./~/admin-lte/dist/js/app.min.js script-loader!./~/fullcalendar/dist/fullcalendar.min.js script-loader!./~/fullcalendar/dist/locale/fr.js script-loader!./~/mapbox-gl/dist/mapbox-gl.js script-loader!./~/ng2-bs3-modal/bundles/ng2-bs3-modal.min.js script-loader!./~/ng2-bootstrap/bundles/ng2-bootstrap.umd.min.js [INFO] [INFO] ERROR in Cannot read property 'getSymbolByModule' of undefined

same issue but FIXED 😃 if you are using “npm install bootstrap@3.3.7” to install bootstrap 3.3.7 you will face the error, MUST USE --save, “npm install bootstrap@3.3.7 --save”.

and for jQuery MUST USE jQuery with small q “npm install jquery”, DO NOT USE “npm install jQuery”.

This is perfect solution and worked for me… 😃 👍 🥇 💯

@craftpip exactly what package did you miss?

i run on this same problem aswell and the 100% fix on this is the rewrite the code manually. instead of copy pasting it and edit the path. styles: [ “styles.css”, “…/node_modules/bootstrap/dist/css/bootstrap.css” ], scripts: [ “…/node_modules/jquery/dist/jquery.js”, “…/node_modules/bootstrap/dist/js/bootstrap.js” ]

Try to update your path styles: [ “styles.css”, “…/node_modules/bootstrap/dist/css/bootstrap.css” ], scripts: [ “…/node_modules/jquery/dist/jquery.js”, “…/node_modules/bootstrap/dist/js/bootstrap.js” ]

We are also having similar problems, oddly installing node_modules using yarn seems to resolve the issue - not sure why?