Giter Club home page Giter Club logo

Comments (4)

jaawerth avatar jaawerth commented on May 31, 2024

I haven't used Meteor, but I seem to recall that it does some custom magic with modules. CmisJS currently goes into "node" mode by checking if CommonJS is in use and window is undefined, which could be what's causing the issue with Meteor. I believe there are ways to wrap these modules in Meteor to get them working better, but that's the direction you'll want to look in to get it working, I believe.

Also, did you install via npm?

from cmisjs.

wimco avatar wimco commented on May 31, 2024

No, presently I just call it directly as a js script. It works fine in the browser, and it looks to work from server side when I comment out lines 1124-1132 of the CmisJS script:

    // http://visionmedia.github.io/superagent
    var request;

    // if running on node.js require superagent
    if (typeof module !== 'undefined' && module.exports) {
      request = require('superagent');
    } else {
      request = window.superagent;
    }

And then explicitly create a global variable "request" to instantiate superagent. Since there's no window available to satisfy the if statement on line 1128.

Will do some more tests with this case and post back whether it works right.

from cmisjs.

jaawerth avatar jaawerth commented on May 31, 2024

If you look online, there seem to be a few guides out there for integrating npm packages into Meteor - if you want to be able to get updates as you develop, that's personally what I'd look into first, but YMMV.

from cmisjs.

wimco avatar wimco commented on May 31, 2024

I agree that that would be the better way.

I tried that at first months ago, ran into issues with connecting to Alfresco 4.2, and the NPM module for CmisJS was 2 versions behind the one on Git. So I thought it would help to use the latest version. It didn't, as the problem was that Alfresco 4.2 did not fully support the CMIS 1.1 spec, and when I changed to Alfresco 5, everything worked.

So it's perhaps time to refactor my code to use the NPM again...
Thanks

from cmisjs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.