angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

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

Open PhilippRoessner opened this issue 9 years ago • 39 comments

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.

PhilippRoessner avatar Mar 26 '17 15:03 PhilippRoessner

I got that too. But for styles and addons

cliedelt avatar Mar 27 '17 14:03 cliedelt

I have the same issue

patryk-zielinski93 avatar Mar 27 '17 16:03 patryk-zielinski93

I got same issue.

anhvupham avatar Mar 29 '17 00:03 anhvupham

Just want to say that this is a really critical (killer) feature of angular-cli and it's build process. If Treeshaking would also fail, I would skip angular-cli.

I am wondering (not trolling, really interessted!) how this could pass unit-tests? We don't use unit-tests ourselves, so does angular-cli development have unit tests?

PhilippRoessner avatar Mar 31 '17 20:03 PhilippRoessner

Same here, pretty important in our software.

EddyNll avatar Apr 03 '17 13:04 EddyNll

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

the-r3dshirt avatar Apr 05 '17 00:04 the-r3dshirt

Hey guys. Try to check the urls again. After checking and correct it. It works for me now. But of course, probably should have some better error message. On Tue, Apr 4, 2017 at 5:38 PM the-r3dshirt [email protected] wrote:

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

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/angular/angular-cli/issues/5665#issuecomment-291691591, or mute the thread https://github.com/notifications/unsubscribe-auth/AEDfwDlV7y6fCeHeu2U0rvPM4BPZgpriks5rsuKNgaJpZM4Mpd2R .

anhvupham avatar Apr 05 '17 00:04 anhvupham

Right found our problem, moment-timezone version change combined with a filename change and a yarn.lock referencing an earlier version of moment-timzone.

The error message in this case could use a little work showing which script/file specifically could not be loaded.

the-r3dshirt avatar Apr 05 '17 02:04 the-r3dshirt

Same issue after updating to 1.0.0 and adding a new app into apps.

zilions avatar Apr 07 '17 07:04 zilions

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

mmaryo avatar Apr 14 '17 08:04 mmaryo

I've just run into the same here.

ghost avatar Apr 19 '17 01:04 ghost

I do yarn upgrade and it's works

mmaryo avatar Apr 19 '17 08:04 mmaryo

"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

eliyas5044 avatar Apr 22 '17 07:04 eliyas5044

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

filipesilva avatar May 03 '17 10:05 filipesilva

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?

smatthews1999 avatar May 09 '17 00:05 smatthews1999

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

ramiromd avatar May 12 '17 20:05 ramiromd

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

devsubhajit avatar May 15 '17 06:05 devsubhajit

@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?

CormacAsGaeilge avatar Jun 08 '17 10:06 CormacAsGaeilge

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

sagarbhanushali avatar Jun 27 '17 05:06 sagarbhanushali

Any update on this? I got the same error after updating angular-cli to 1.2.0 My paths are accurate, no idea why it isn't working.

EDIT: Fixed, I missed a package.

craftpip avatar Jul 12 '17 19:07 craftpip