linkeddata / tabulator

Linked Data Browser
46 stars 22 forks source link

Refactoring around node and bowserify broke extension: Cannot find module 'solid' #9

Closed timbl closed 8 years ago

timbl commented 8 years ago

Tabulator init.js: Error: Cannot find module 'solid'

Long version:

/Applications/Firefox.app/Contents/MacOS/firefox-bin

...

@@ Loading js/tab/log-ext.js
@@@ init.js Inital setting of tabulator.log
Hmmm, tabulator.jQuery not defined. Not loading RDFa
@@ Loading js/rdf/dist/rdflib.js
@@ Loading js/solid/dist/solid.js
@@ Loading js/tab/common.js
@@ Loading js/init/icons.js
@@ Loading js/init/namespaces.js
@@ Loading js/init/panes.js
@@ Loading js/panes/common/acl.js
@@ Loading js/panes/common/acl-control.js
@@ Loading js/panes/common/widgets.js
@@ Loading js/panes/common/signin.js
Tabulator init.js:  Aaaaagh loading failed
Tabulator init.js: Error: Cannot find module 'solid'
  chrome://tabulator/content/js/solid/dist/solid.js:1:156
    s  chrome://tabulator/content/js/solid/dist/solid.js:1:122
    s  chrome://tabulator/content/js/panes/common/signin.js:7:16
      chrome://tabulator/content/js/init/init.js:30:5
    tabulator.loadScript  chrome://tabulator/content/js/init/panes.js:52:1
      chrome://tabulator/content/js/init/init.js:30:5
    tabulator.loadScript  chrome://tabulator/content/js/init/init.js:70:5
      file:///devel/github.com/linkeddata/tabulator-firefox/components/xpcom.js:34:5
    Tabulator  resource://gre/modules/XPCOMUtils.jsm:326:19
    XPCOMUtils__getFactory/factory.createInstance  chrome://tabulator/content/js/tab/browserInit.js:3:17
      undefined

@@ init.js END
dmitrizagidulin commented 8 years ago

Which versions are being used in your environment? (of rdflib, of solid)

dmitrizagidulin commented 8 years ago

Potentially fixed by PR https://github.com/linkeddata/rdflib.js/pull/102 -- pull latest RDFLib, run the mashlib make, and try it again.

timbl commented 8 years ago

Now I get

@@ Loading js/tab/log-ext.js
@@@ init.js Inital setting of tabulator.log
Hmmm, tabulator.jQuery not defined. Not loading RDFa
@@ Loading js/rdf/dist/rdflib.js
@@ Loading js/solid/dist/solid.js
@@ Loading js/tab/common.js
@@ Loading js/init/icons.js
@@ Loading js/init/namespaces.js
@@ Loading js/init/panes.js
@@ Loading js/panes/common/acl.js
@@ Loading js/panes/common/acl-control.js
@@ Loading js/panes/common/widgets.js
@@ Loading js/panes/common/signin.js
Tabulator init.js:  Aaaaagh loading failed
Tabulator init.js: Error: Cannot find module 'rdflib'
  chrome://tabulator/content/js/solid/dist/solid.js:1:156
    s  chrome://tabulator/content/js/solid/dist/solid.js:1:122
    s  chrome://tabulator/content/js/solid/dist/solid.js:1:313
    s/<  chrome://tabulator/content/js/solid/dist/solid.js:389:22
    require<[6]<  chrome://tabulator/content/js/solid/dist/solid.js:1:254
    s  chrome://tabulator/content/js/solid/dist/solid.js:1:313
    s/<  chrome://tabulator/content/js/solid/dist/solid.js:194:11
    require<[3]<  chrome://tabulator/content/js/solid/dist/solid.js:1:254
    s  chrome://tabulator/content/js/solid/dist/solid.js:1:313
    s/<  chrome://tabulator/content/js/solid/dist/solid.js:1127:17
    require<[13]<  chrome://tabulator/content/js/solid/dist/solid.js:1:254
    s  chrome://tabulator/content/js/solid/dist/solid.js:1:313
    s/<  chrome://tabulator/content/js/solid/dist/solid.js:85:17
    require<[2]<  chrome://tabulator/content/js/solid/dist/solid.js:1:254
    s  chrome://tabulator/content/js/solid/dist/solid.js:1:313
    s/<  chrome://tabulator/content/js/solid/dist/solid.js:1550:9
    require<.solid<  chrome://tabulator/content/js/solid/dist/solid.js:1:254
    s  chrome://tabulator/content/js/panes/common/signin.js:7:16
      chrome://tabulator/content/js/init/init.js:30:5
    tabulator.loadScript  chrome://tabulator/content/js/init/panes.js:52:1
      chrome://tabulator/content/js/init/init.js:30:5
    tabulator.loadScript  chrome://tabulator/content/js/init/init.js:70:5
      file:///devel/github.com/linkeddata/tabulator-firefox/components/xpcom.js:34:5
    Tabulator  resource://gre/modules/XPCOMUtils.jsm:326:19
dmitrizagidulin commented 8 years ago

@timbl - which version or revision of rdflib are you running now, let's double check. And - have you ran 'make clean all' on it?

timbl commented 8 years ago

Ok, have branch extension-fixes in solid, where the problem was. It was with the code for creating XHRRequest and solid.RDFlib in the extension context, which is not the bowser context as for example window does not exist.

dmitrizagidulin commented 8 years ago

Sounds like the problem is fixed in solid.js, closing this issue.