Search found 37 matches

by borisCM
Tue Nov 08, 2022 3:08 pm
Forum: Node.js scripting
Topic: updating switch nodejs sripting capabilities
Replies: 2
Views: 2836

Re: updating switch nodejs sripting capabilities

perfect, thanks for your help. it works.
by borisCM
Tue Nov 08, 2022 1:36 pm
Forum: Node.js scripting
Topic: updating switch nodejs sripting capabilities
Replies: 2
Views: 2836

updating switch nodejs sripting capabilities

hi, i have some older node js projects. i can't get the new functionalities working (it creates type errors in visual studio code). such as - the json dataset model, - not having to use the messageParams array [] -... switch scripting issue.PNG if i create a project from scratch it is not an issue. ...
by borisCM
Mon Oct 24, 2022 9:35 am
Forum: Node.js scripting
Topic: getting out connection properties
Replies: 3
Views: 3124

Re: getting out connection properties

ok,

Thanks for the info.
by borisCM
Sun Oct 23, 2022 8:02 pm
Forum: Node.js scripting
Topic: getting out connection properties
Replies: 3
Views: 3124

getting out connection properties

hi, is it possible to get the standard connection properties in a node script? i need to find out if the "Carry this type of jobs" log connection is used, so i can create a log file only when the log is requested. outConnectionsProperties.PNG the properties list of the connection is empty ...
by borisCM
Wed Jul 20, 2022 12:03 pm
Forum: PitStop Pro
Topic: selecting pages with no black separation
Replies: 1
Views: 871

selecting pages with no black separation

Hi, i'm looking for an action list to select al pages that are missing a black separation. so i can add a black object on those pages. i tried using the "select process colorant" and only select the black. https://www.enfocus.com/manuals/Extra/Actions/22/home.html#en-us/common/act/concept/...
by borisCM
Fri May 13, 2022 12:27 pm
Forum: Node.js scripting
Topic: api call with https
Replies: 4
Views: 4977

Re: api call with https

Hi,

anyone has an example of how to use the axios interceptor to handle error responses?
https://axios-http.com/docs/interceptors

i actually just want to get the body of the response, no matter if it is a succes or a error.
by borisCM
Tue Mar 08, 2022 12:25 pm
Forum: Node.js scripting
Topic: Channel Closed issue
Replies: 3
Views: 2201

Re: Channel Closed issue

according to enfocus support this is a bug.
and hopefully fixed in the spring release.
Yes, if possible, the fixed is planned to be in the v2022/Spring release. Of course, this could change if the fix becomes more complicated or due to other priorities.
by borisCM
Fri Feb 25, 2022 1:40 pm
Forum: Node.js scripting
Topic: Channel Closed issue
Replies: 3
Views: 2201

Re: Channel Closed issue

ok,
thanks for your reply, will do that

kind regards
by borisCM
Fri Feb 25, 2022 10:26 am
Forum: Node.js scripting
Topic: Channel Closed issue
Replies: 3
Views: 2201

Channel Closed issue

hi, Once in a while i get a "Channel closed" error in some of my nodeJS scripts. i had 2 this morning in 2 different scripts with 2 different jobs. when processing the exact same jobs with the scripts again, no issues. i have no idea where to start looking. is this the result of bad progra...
by borisCM
Tue Feb 01, 2022 6:22 pm
Forum: Node.js scripting
Topic: EMFILE: too many open files
Replies: 6
Views: 3830

Re: EMFILE: too many open files

think i found a solution https://raszi.github.io/node-tmp/ const tmp = require('tmp'); const tmpobj = tmp.fileSync(); console.log('File: ', tmpobj.name); console.log('Filedescriptor: ', tmpobj.fd); // If we don't need the file anymore we could manually call the removeCallback // But that is not nece...
by borisCM
Tue Feb 01, 2022 5:54 pm
Forum: Node.js scripting
Topic: EMFILE: too many open files
Replies: 6
Views: 3830

Re: EMFILE: too many open files

this fixed the type issue

Code: Select all

import *  as fs from "fs"; 
import * as tmp from "tmp"; 
instead of

Code: Select all

const fs = import("fs");
by borisCM
Tue Feb 01, 2022 5:46 pm
Forum: Node.js scripting
Topic: EMFILE: too many open files
Replies: 6
Views: 3830

Re: EMFILE: too many open files

jes jes.

the standard fs has the same behavior and there i don't need to install the types separatly normally

i need to add it like this:

Code: Select all

(await fs).writeFileSync(tmpBoundCover.name, xmlStringBoundCover, "utf-8");
(await fs).unlinkSync(tmpBoundCover.name);
by borisCM
Tue Feb 01, 2022 5:25 pm
Forum: Node.js scripting
Topic: EMFILE: too many open files
Replies: 6
Views: 3830

Re: EMFILE: too many open files

thanks for the quick response. the await gets added automatically while typing and if i dont place it, visual studio code gives a type error. Property 'fileSync' does not exist on type 'Promise<{ default: typeof import(.../DEV/ImpPPXML/node_modules/@types/tmp/index"); file(options: FileOptions,...
by borisCM
Tue Feb 01, 2022 2:16 pm
Forum: Node.js scripting
Topic: EMFILE: too many open files
Replies: 6
Views: 3830

EMFILE: too many open files

Hi, i think i am doing something wrong in my node.js projects. after a while i get a lot of "EMFILE: too many open files, open" errors in switch i'm working on windows i am using tmp module to create the tmp files const tmp = import("tmp") let orderXMLdocTMP = (await tmp).fileSyn...
by borisCM
Thu Mar 11, 2021 4:06 pm
Forum: Node.js scripting
Topic: switchScriptTool --pack
Replies: 6
Views: 6762

Re: switchScriptTool --pack

sorry,
that wasn't clear
i pack it to ../../PRD
so it is outside of the original folder