Git Product home page Git Product logo

joystream-api-examples's Issues

TypeError: Cannot read property 'flags' of undefined

I have cloned the repo and ran this command
yarn && yarn build

at the end of yarn build this error occurs.

PS D:\xampp\htdocs\joystream-api-examples> yarn
yarn install v1.22.0
info No lockfile found.
[1/4] Resolving packages...
warning @joystream/types > @types/[email protected]: This is a stub types definition. vfile provides its own type definitions, so you do not need this installed.
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Saved lockfile.
Done in 38.71s.
PS D:\xampp\htdocs\joystream-api-examples> yarn build
yarn run v1.22.0
$ tsc --build tsconfig.json
D:\xampp\htdocs\joystream-api-examples\node_modules\typescript\lib\tsc.js:10245
        return !!(module.flags & 1024);
                         ^

TypeError: Cannot read property 'flags' of undefined
    at Object.isGlobalScopeAugmentation (D:\xampp\htdocs\joystream-api-examples\node_modules\typescript\lib\tsc.js:10245:26)
    at D:\xampp\htdocs\joystream-api-examples\node_modules\typescript\lib\tsc.js:84779:96
    at Object.some (D:\xampp\htdocs\joystream-api-examples\node_modules\typescript\lib\tsc.js:587:25)
    at containsGlobalScopeAugmentation (D:\xampp\htdocs\joystream-api-examples\node_modules\typescript\lib\tsc.js:84779:23)
    at isFileAffectingGlobalScope (D:\xampp\htdocs\joystream-api-examples\node_modules\typescript\lib\tsc.js:84782:20)
    at Object.create (D:\xampp\htdocs\joystream-api-examples\node_modules\typescript\lib\tsc.js:84603:139)
    at createBuilderProgramState (D:\xampp\htdocs\joystream-api-examples\node_modules\typescript\lib\tsc.js:84849:37)
    at Object.createBuilderProgram (D:\xampp\htdocs\joystream-api-examples\node_modules\typescript\lib\tsc.js:85352:21)
    at createEmitAndSemanticDiagnosticsBuilderProgram (D:\xampp\htdocs\joystream-api-examples\node_modules\typescript\lib\tsc.js:85586:19)
    at Object.host.createProgram (D:\xampp\htdocs\joystream-api-examples\node_modules\typescript\lib\tsc.js:89130:20)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

ExtError: Multiple versions of @polkadot/types detected

Getting following error when running node lib\status

/Users/mokhtar/joystream/joystream-api-examples/node_modules/@polkadot/util/assert.js:47
  throw new _error.default(message, code, data);
  ^

ExtError: Multiple versions of @polkadot/types detected, ensure that there is only version one in your dependency tree
    at assert (/Users/mokhtar/joystream/joystream-api-examples/node_modules/@polkadot/util/assert.js:47:9)
    at assertSingletonPackage (/Users/mokhtar/joystream/joystream-api-examples/node_modules/@polkadot/util/assertSingletonPackage.js:30:23)
    at Object.<anonymous> (/Users/mokhtar/joystream/joystream-api-examples/node_modules/@polkadot/types/index.js:52:34)
    at Module._compile (internal/modules/cjs/loader.js:701:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
    at Module.load (internal/modules/cjs/loader.js:600:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
    at Function.Module._load (internal/modules/cjs/loader.js:531:3)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:22:18)

It seems each dependency which correspondingly has a dependency on @polkadot/types is introducing another "copy" in the node_modules/ tree. This seems like normal behavior of npm and yarn? But it seems this is happening even for the same exact version.

Understandably @polkadot/util/assert.js is trying to detect this at runtime to avoid potential problems.

How can we resolve this? Is there some special argument to add for npm install or yarn install to prevent this?

Cannot construct unknow n type CuratorGroupId

did everything many times.
installed yarn lock deps
made yarn build

npm run script example

nable to resolve type CuratorGroupId, it will fail on construction
Unable to resolve type Status, it will fail on construction
Unable to resolve type EntityController, it will fail on construction
Unable to resolve type EntityCreationVoucher, it will fail on construction
Unable to resolve type SchemaId, it will fail on construction
Unable to resolve type Actor, it will fail on construction
Unable to resolve type SideEffects, it will fail on construction
Unable to resolve type PropertyId, it will fail on construction
Unable to resolve type VecMaxLength, it will fail on construction
Unable to resolve type Nonce, it will fail on construction
Unable to resolve type SideEffect, it will fail on construction
Unable to resolve type FailedAt, it will fail on construction

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.