Skip to content

Library browser support #16

@FidelElie

Description

@FidelElie

Hey great library, was wondering if you could shed some light on using this in a browser envrionment. I have react native project that would benefit from using this library to create raw queries but I get this metro error when I attempt it.

Metro has encountered an error: While trying to resolve module `sql-ts` from file `/path/to/packages/db/utilities/schema.utilities.ts`, the package `/path/to/node_modules/sql-ts/package.json` was successfully found. However, this package itself specifies a `main` module field that could not be resolved (`path/to/node_modules/sql-ts/index`. Indeed, none of these files exist:

  * /path/to/node_modules/sql-ts/index(.ios.ts|.native.ts|.ts|.ios.tsx|.native.tsx|.tsx|.ios.mjs|.native.mjs|.mjs|.ios.js|.native.js|.js|.ios.jsx|.native.jsx|.jsx|.ios.json|.native.json|.json|.ios.cjs|.native.cjs|.cjs|.ios.scss|.native.scss|.scss|.ios.sass|.native.sass|.sass|.ios.css|.native.css|.css|.ios.svg|.native.svg|.svg)
  * /path/to/node_modules/sql-ts/index/index(.ios.ts|.native.ts|.ts|.ios.tsx|.native.tsx|.tsx|.ios.mjs|.native.mjs|.mjs|.ios.js|.native.js|.js|.ios.jsx|.native.jsx|.jsx|.ios.json|.native.json|.json|.ios.cjs|.native.cjs|.cjs|.ios.scss|.native.scss|.scss|.ios.sass|.native.sass|.sass|.ios.css|.native.css|.css|.ios.svg|.native.svg|.svg): /path/toy/node_modules/metro/src/node-haste/DependencyGraph.js (248:17)

I am also trying to import this from a different package in a monorepo but the problem only arises when I import something that uses this pacakge.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions