Skip to content
This repository has been archived by the owner on Sep 5, 2023. It is now read-only.

Cannot build - problem with @types/n3 #13

Open
flyon opened this issue Jan 17, 2022 · 3 comments
Open

Cannot build - problem with @types/n3 #13

flyon opened this issue Jan 17, 2022 · 3 comments

Comments

@flyon
Copy link

flyon commented Jan 17, 2022

hey guys, great library. Ive been messing with my own ontology files since forever and have been thinking of building something exactly like this. But you already built it, and in a very clean and functional way by the looks of it. 👌

I wanted to build it locally and play with some things. But I get an error for @types/n3 on this line:

image

Here's the full error.

Never seen something like that in types. Maybe n3 type dependency is too loose together with typescript dependency?

ontola\ontologies\core> yarn build
yarn run v1.22.5
$ pika build
@pika/pack v0.5.0
[1/7] Validating source...
[2/7] Preparing pipeline...
      ❇️  pkg\
../node_modules/@types/n3/index.d.ts(175,47): error TS1110: Type expected.
../node_modules/@types/n3/index.d.ts(177,40): error TS1110: Type expected.

Error: Command failed with exit code 2 (Unknown system error -2): C:\web\dacore\ontola\ontologies\core\node_modules\typescript\bin\tsc --outDir C:\web\dacore\ontola\ontologies\core\pkg\dist-src\ -d --
declarationDir C:\web\dacore\ontola\ontologies\core\pkg\dist-types\ --project C:\web\dacore\ontola\ontologies\core\tsconfig.json --target es2019 --module esnext --noEmit false --sourceMap false       
    at makeError (C:\web\dacore\ontola\ontologies\core\node_modules\execa\lib\error.js:59:11)
    at handlePromise (C:\web\dacore\ontola\ontologies\core\node_modules\execa\index.js:112:26)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async Object.build (C:\web\dacore\ontola\ontologies\core\node_modules\@pika\plugin-ts-standard-pkg\dist-node\index.js:139:3)
    at async C:\web\dacore\ontola\ontologies\core\node_modules\@pika\pack\dist-node\index.js:2375:11
    at async Build.init (C:\web\dacore\ontola\ontologies\core\node_modules\@pika\pack\dist-node\index.js:2459:7)
@flyon
Copy link
Author

flyon commented Jan 17, 2022

Yes, looks like it. Typescript supports "template literal strings" from version 4.1
I've tried downgrading @types/n3 to "1.10.0", which is the last version tagged with typescript 3 and then ran yarn install but now I get a different error

../node_modules/@types/n3/index.d.ts(14,22): error TS2307: Cannot find module 'rdf-js'.

Ideas?

@rescribet
Copy link
Collaborator

The last one looks like @types/n3 has rdf-js as a peer dependency, which therefore has to be added as a dev dependency

@flyon
Copy link
Author

flyon commented Jan 19, 2022

well spotted, got it to work now with a few other changes, submitted a PR

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants