0

I am attempting to set an environment variable for opencv4nodejs, but all that is told in the documentation is to do

export OPENCV4NODEJS_DISABLE_AUTOBUILD=1

for linux OS(I am using repl.it to run my program, and replit runs on linux OS).

The issue is I don't know how to do this. I know I have to use secrets to set the env variable, but I have no idea what to set the "key" and "value" to for the Env var.

enter image description here

Here is what I have, but my best guess is to set OPENCV4NODEJS_DISABLE_AUTOBUILD for the key and 1 to the value, though I either am not calling that right in index.js or I set the wrong values. My question is, which is my error here and how do I fix it.

Thanks.

EDIT: I made a mistake reading the documentation. Thought it ended there.

enter image description here

Thanks to user 'TBA' the first issue was figured out. The next, is, how does an environment variable point to a folder? I'm assuming the value would then be a path such as /folderOfStuff, but do I manually add a folder called "opencv2"

HelloTher
  • 1
  • 3
  • The key should be `OPENCV4NODEJS_DISABLE_AUTOBUILD` (and not `export OPENCV4NODEJS_DISABLE_AUTOBUILD=1`) and the value should be 1 (and not empty) – TBA Jan 22 '23 at 05:12
  • Thanks! Do you know how to use this as well? Still getting the same error when I const mySecret that in index.js. Im not sure how to use it. – HelloTher Jan 22 '23 at 05:44
  • Not error of the thing itself but of it not being used – HelloTher Jan 22 '23 at 05:45
  • Are you using this variable in your code or only during compile\build time? – TBA Jan 22 '23 at 06:29
  • Oh my bad I made some mistakes, your thing worked, I just didn;t see more steps. I edited the question – HelloTher Jan 22 '23 at 06:47

0 Answers0