Closed spaghettifunk closed 2 years ago
Hey @spaghettifunk,
rm -rf node_modules
npm install
The error message you're receiving is mostly because some kind of circular dependency situation and it's actually happening in one of our dependencies, not the library itself. It seems like you'll need to upgrade or downgrade your node version.
Thank you for the quick reply! I tried a bunch of things like:
yarn
I created a Vue app with Vite
and added the library. I still get the same message 😞 I post here the relevant files, maybe you catch something I cannot see
// package.json
{
"name": "app",
"private": true,
"version": "0.0.0",
"scripts": {
"dev": "vite",
"build": "vue-tsc --noEmit && vite build",
"preview": "vite preview"
},
"dependencies": {
"@depyronick/clickhouse-client": "^1.0.12",
"vue": "^3.2.25"
},
"devDependencies": {
"@vitejs/plugin-vue": "^2.3.0",
"typescript": "^4.5.4",
"vite": "^2.9.0",
"vue-tsc": "^0.29.8"
}
}
// App.vue
<script setup lang="ts">
import HelloWorld from './components/HelloWorld.vue'
</script>
<template>
<HelloWorld />
</template>
<style>
</style>
// HelloWorld.vue
<script setup lang="ts">
import { ClickHouseClient } from '@depyronick/clickhouse-client';
const client = new ClickHouseClient({});
console.log(client);
</script>
<template>
</template>
I think the problem could be related to a dependency inside vite
but I scanned each folder in node_modules
and the stream-json
package is not present besides the clickhouse-client
.
So basically you're trying to use this library on your frontend.
This library is just for nodejs applications, it's not intended to use on frontend environments.
You should use this library with your javascript or typescript backend project.
Yeah exactly! All right, I will create a backend and use it there instead. Thank you for the help! Really appreciate it. I will close the issue.
Thank you for this client and for the hard work! In the latest version I'm not able to start the client. My project is in typescript and once I start the project I receive the following error
I'm not an expert but it seems the class
FilterBase.js
is not properly initialized or something. I tried also version 1.0.11` and I get the same error. Any pointer on what this could be?Thank you again 😄