https://promptfoo.dev/ logo
Testing promptfoo library locally
# ❓|questions
k
We use the promptfoo as a package in another application. It works fine and runs locally on my laptop. Not I want to make a change to the promptfoo code and test it out in my applicatiom. So,
Copy code
npm run build
In my other project:
Copy code
"promptfoo": "file:///Users/kosborn/git/fulcrumapp/promptfoo"
And then I get this error:
Copy code
Error running database migrations: Error: dlopen(/Users/kosborn/git/fulcrumapp/veracity/node_modules/promptfoo/node_modules/better-sqlite3/build/Release/better_sqlite3.node, 0x0001): tried: '/Users/kosborn/git/fulcrumapp/veracity/node_modules/promptfoo/node_modules/better-sqlite3/build/Release/better_sqlite3.node' (not a mach-o file), '/System/Volumes/Preboot/Cryptexes/OS/Users/kosborn/git/fulcrumapp/veracity/node_modules/promptfoo/node_modules/better-sqlite3/build/Release/better_sqlite3.node' (no such file), '/Users/kosborn/git/fulcrumapp/veracity/node_modules/promptfoo/node_modules/better-sqlite3/build/Release/better_sqlite3.node' (not a mach-o file)
I assume it must be because it is not packaged the same way. Is there a good way to test my changes locally as an NPM dependency?
i
you might have to point it to the
dist/
folder within promptfoo project after a build
2 Views