Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export node-api #576

Merged
merged 1 commit into from
Nov 15, 2024
Merged

Export node-api #576

merged 1 commit into from
Nov 15, 2024

Conversation

zertan
Copy link
Contributor

@zertan zertan commented Nov 15, 2024

Hi, while adding macro support to vite-plugin-squint I am getting issues trying to import "node-api.js":

vite-plugin-squint/index.mjs:
import { compileString } from "./node_modules/squint-cljs/lib/compiler.node.js"

...

error:
8:32:01 PM [vite] Pre-transform error: The "path" argument must be of type string or an instance of Buffer or URL. Received null
8:32:01 PM [vite] Internal server error: The "path" argument must be of type string or an instance of Buffer or URL. Received null
at Module.readFileSync (node:fs:446:42)
at file:///home/daniel/repos/template/node_modules/@w3t-ab/vite-plugin-squint/node_modules/squint-cljs/lib/compiler.sci.js:1165:485
at file:///home/daniel/repos/template/node_modules/@w3t-ab/vite-plugin-squint/node_modules/squint-cljs/lib/compiler.sci.js:138:316

it works with export in squint-cljs and:

import { compileString } from "squint-cljs/node-api.js"

//Daniel

@borkdude borkdude merged commit d95ee4e into squint-cljs:main Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants