Giter VIP home page Giter VIP logo

Comments (6)

serkan-inci avatar serkan-inci commented on May 12, 2024

@random82

Please make sure that you compile your server and client code separately. Client should be compiled as amd module whereas server is commonjs.

Thanks
Serkan

from vss-web-extension-sdk.

random82 avatar random82 commented on May 12, 2024

Thanks @serkan-inci

I thought I have only a client component.
This error is coming from
"vss": "npm:vss-web-extension-sdk/typings/vss.d.ts"

which has a definition of VSS which I use to obtain project id

VSS.getWebContext().project.id;

from vss-web-extension-sdk.

cschleiden avatar cschleiden commented on May 12, 2024

You have require and requirejs in your typings, I think that results in that error.

from vss-web-extension-sdk.

random82 avatar random82 commented on May 12, 2024

@cschleiden I've tried to remove require and node typings - it just gives me other set of errors. All of the errors is coming from VSS

ERROR in \awesome-project\typings\globals\vss\index.d.ts
(214,22): error TS2304: Cannot find name 'Require'.

ERROR in \awesome-project\typings\globals\vss\index.d.ts
(215,21): error TS2304: Cannot find name 'RequireDefine'. 

from vss-web-extension-sdk.

random82 avatar random82 commented on May 12, 2024

@cschleiden I've upgraded the SDK to

"vss-web-extension-sdk": "^2.113.0",

now my typings look like this:

{
  "globalDependencies": {
    "chai": "registry:dt/chai#3.4.0+20160601211834",
    "core-js": "registry:dt/core-js#0.0.0+20160602141332",
    "jasmine": "registry:dt/jasmine#2.5.0+20161025102649",
    "node": "registry:dt/node#6.0.0+20161121110008",
    "q": "registry:dt/q#0.0.0+20160613154756",
    "sinon": "registry:dt/sinon#1.16.0+20160924120326"
  },
  "dependencies": {
    "lodash": "registry:npm/lodash#4.0.0+20161015015725"
  }
}

and tsconig.json

{    
    "compilerOptions": {
        "target": "es5",
        "module": "amd",
        "moduleResolution": "node",
        "sourceMap": false,
        "outDir": "dist",
        "experimentalDecorators": true,       
        "emitDecoratorMetadata": true,
        "typeRoots": ["node_modules"],
        "types": [
            "types.d3",
            "vss-web-extension-sdk"
        ]    
    }
}

still, the problem remains.

from vss-web-extension-sdk.

random82 avatar random82 commented on May 12, 2024

Found the problem - it was caused by "node": "registry:dt/node#6.0.0+20161121110008" type definition

from vss-web-extension-sdk.

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.