wirecloud-fiware / ngsi-source-operator

WireCloud operator for using Orion Context Broker as data source
Apache License 2.0
2 stars 10 forks source link

ReferenceError: moment is not defined #12

Closed fisuda closed 5 years ago

fisuda commented 6 years ago

I encountered the following error.

ReferenceError: moment is not defined
    at NGSISource.doInitialSubscription (http://172.16.1.11/showcase/media/CoNWeT/ngsi-source/4.0.0/js/main.js:157:32)
    at NGSISource.handlerPreferences (http://172.16.1.11/showcase/media/CoNWeT/ngsi-source/4.0.0/js/main.js:262:35)
    at OperatorPreferencesWindowMenu.operatorCallback (http://172.16.1.11/static/cache/js/ed09ef02247e.js:1335:25)
    at OperatorPreferencesWindowMenu._savePrefs (http://172.16.1.11/static/cache/js/ed09ef02247e.js:1334:341)

This reason is that the moment-with-locales.min.js file isn't found.

Failed to load resource: the server responded with a status of 404 (Not Found) http://172.16.1.11/showcase/media/CoNWet/ngsi-source/4.0.0/lib/js/moment-with-locales.min.js

I checked a message when making a wgt file.

root@4ca5539184a0:/work# grunt bower:install
Running "bower:install" (bower) task
(node:45) [DEP0022] DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
>> Installed bower packages

Done.

A .js file is not copied while running bower:install. The ">> Copied packages to /work/build/lib/lib" message is not found.

It seems that a file is copied when using grunt-bower-task:0.4.0 but not copied when using 0.5.0.

aarranz commented 5 years ago

Hi @fisuda,

you are right I didn't notice it until I've used a clean working copy of the repository.

I'm fixing it, sorry for the delay.