joereynolds / joereynolds/sql-lint

Sql-lint import in browser occurs error

Open
#257 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
459
Forks
44
PR merge metrics
No merged PRs in 30d

Description

Hi! I really want to use your lib in my project on SvelteKit. However when I try to import lib on my client side, there is error "ReferenceError: process is not defined". I didn't pass any info about DB, I just want to lint sql query sintaksis. Also on server-side import works well.

As I know "process is not defined" error usually occurs when there's a try to use some server-side variables on client-side. However I guess that when I don't connect to DB, there shouldn't be such variables. So is there an opportunity to exec your lib in client-side? I apperciate your help!

Import script:
```js
import sqlLint from 'sql-lint'
```

Error log in DevTools:

![image](https://github.com/joereynolds/sql-lint/assets/55619509/a1d8a08a-7d99-42db-8e90-497940563cf7)

Code in utils.js:109:1:

![image](https://github.com/joereynolds/sql-lint/assets/55619509/00de3816-d6c3-44be-8d6a-750ec0b69a02)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.