Hi,
I am trying to build a psjs script file but I got the following error:
Error loading the Script /main.psjs EvalError: Code generation from strings disallowed for this context
Here is my simple index.js file:
const photoshop = require("photoshop");
const { app, constants } = photoshop;
const { showAlert } = photoshop.core;
showAlert("lala")
const cv = require ("@techstark/opencv-js");
showAlert("cv " + cv)
and my package.json:
{
"name": "01_opencv",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"build": "esbuild ./src/index.js --bundle --outfile=./dist/main.psjs --external:photoshop --platform=node",
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"dependencies": {
"@techstark/opencv-js": "^4.9.0-release.3",
"esbuild": "^0.23.0"
}
}