requirejs error loading js components
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ubuntu-touch-meta (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Hi,
I am developing a Whatsapp client for Ubuntu Touch and I am using requirejs because is a webapp. I am seeing is an error with absolute paths. If the app runs on server there are not problems with absolute paths.
This is te repo with the app source:
https:/
This is the log that can be showed with the webkit (chrome) console:
Failed to load resource: Error opening /scripts/global.js: No such file or directory file://
Failed to load resource: Error opening /scripts/
Failed to load resource: Error opening /scripts/
Failed to load resource: Error opening /scripts/router.js: No such file or directory file://
Failed to load resource: Error opening /scripts/
Failed to load resource: Error opening /scripts/
Failed to load resource: Error opening /scripts/
Failed to load resource: Error opening /scripts/
Failed to load resource: Error opening /scripts/
Failed to load resource: Error opening /scripts/
Failed to load resource: Error opening /scripts/
Failed to load resource: Error opening /scripts/
Failed to load resource: Error opening /scripts/
Failed to load resource: Error opening /scripts/
Failed to load resource: Error opening /scripts/
Error: Script error for: global http://
Error: Script error for: models/auth http://
Error: Script error for: collections/
Error: Script error for: router http://
Error: Script error for: models/rtc http://
Error: Script error for: models/geoposition http://
Error: Script error for: collections/history http://
Error: Script error for: templates/helpers http://
Error: Script error for: utils/notifications http://
Error: Script error for: storage/dbmanager http://
Error: Script error for: localisations/
Error: Script error for: localisations/
Error: Script error for: utils/language http://
Error: Script error for: utils/sdmanager http://
Error: Script error for: models/
Failed to load resource: Error opening /components/
Error: Script error for: underscore http://
Failed to load resource: Error opening /components/
Error: Script error for: zeptojs http://
Error: Load timeout for modules: backbone http://
You can't really make any assumption as to where your application will be installed, so you shouldn't use an absolute path when specifiying resources.