Comments (5)
When you execute tsc
like this, it will ignore the tsconfig.json
file.
To see it working you can run:
node_modules/.bin/tsc --module Node16 test.ts
And then the following will produce the SVG output:
node ./test.js
from hpcc-js-wasm.
@rubenlg - can you take a look at: #205 and see if it helps?
from hpcc-js-wasm.
When you execute
tsc
like this, it will ignore thetsconfig.json
file.
You're right! The correct way to run tsc
is to run without any arguments, that way it will read tsconfig.json
and compile the typescript modules defined in that configuration (by default, all of them). i.e:
node_modules/.bin/tsc
If I do that, it tells me that I have to change another property in the tsconfig.json:
"module": "Node16",
And looking at #205, it seems like moduleResolution
is not needed, changing module
is enough.
Sadly, I still can't use v2 for other reasons (it's a large project with many dependencies, and migrating to both module: Node16
in tsconfig.json
and type: module
in package.json
will take a while, if it's at all possible). But that's independent from this issue.
Thanks for the examples!
from hpcc-js-wasm.
@rubenlg there are two examples in that PR:
- ESM: Which is for the modern "module" type.
- CommonJS: Which does not set either of the two settings above.
In theory the v2 library should be compatible with all TS setups, but given the variety of possible combinations it could be made easier for some of those...
If you could provide your tsconfig.json or setup I could add an example specific for that?
from hpcc-js-wasm.
Thanks! I ran the CommonJS example in the PR as is, and left a comment with the error I got.
from hpcc-js-wasm.
Related Issues (20)
- Error handling using GraphvizSync() layout HOT 23
- How to host .wasm file for client-side application in V2? HOT 1
- Memory access out of bounds error for graphviz layout HOT 9
- IMG tag inside HTML-like table breaks engine (node definition does not appear in graph) HOT 3
- Demo with graphvizSync not working HOT 3
- Provide Unflatten Graphviz Command
- Import error in TypeScript HOT 7
- A question about your project structure
- A temporary alternative solution for web worker version @hpcc-js/wasm/graphicviz HOT 4
- Arrow shapes seem to ignore repetition of shape names HOT 2
- Graphviz Library does not scale to meet layout w/ 1000 nodes + HOT 4
- Output PNG? HOT 1
- Build instructions HOT 2
- vite failed to load graphvizlib.wasm HOT 2
- Sometimes I get a node without label (demo on viz-js.com) HOT 2
- Request for adding "nop" and "nop2" to the Engine type definition
- Adding `gvpack` HOT 3
- Transitive reduction filter for directed graphs - Graphviz HOT 12
- the process random freezes on the graphviz HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hpcc-js-wasm.