Page 1 of 1

NodeScriptExecutor.js.map

Posted: Fri Aug 21, 2020 8:03 am
by Sunnyland
Is anyone else getting this error?

ENOENT: no such file or directory, open 'c:\Program Files\Enfocus\Enfocus Switch\ScriptExecutor\NodeScriptExecutor.js.map'

From what I can tell NodeScriptExecutor.js is in the folder but I do not have a NodeScriptExecutor.js.map file.
Is this something I need to add?

Re: NodeScriptExecutor.js.map

Posted: Fri Aug 21, 2020 10:24 am
by Padawan
Is there anything related to sourceMaps in your package.json file? If so, can you try removing/disabling it?

Re: NodeScriptExecutor.js.map

Posted: Sat Aug 22, 2020 3:10 am
by Sunnyland
No I cannot see anything that refeerences Enfocus Swith in the package.json file at all the complete error is as follows

Could not read source map for file:///C:/Program%20Files/Enfocus/Enfocus%20Switch/ScriptExecutor/NodeScriptExecutor.js: ENOENT: no such file or directory, open 'c:\Program Files\Enfocus\Enfocus Switch\ScriptExecutor\NodeScriptExecutor.js.map'

The file is in the directory and it seems to have read/write access.

Re: NodeScriptExecutor.js.map

Posted: Sat Aug 22, 2020 9:51 am
by Padawan
Can you share your package.json file?

Re: NodeScriptExecutor.js.map

Posted: Mon Aug 24, 2020 12:40 am
by Sunnyland
Sure thing,
Please see the contents of my package.json file

{
"name": "nodejs-job-arrived2",
"version": "0.0.0",
"description": "NodejsJobArrived2",
"main": "main.js",
"author": {
"name": ""
},
"dependencies": {
"easy-soap-request": "^3.3.3",
"express": "^4.17.1",
"fetch": "^1.1.0",
"fs-extra": "^9.0.1",
"node-fetch": "^2.6.0",
"soap": "^0.33.0",
"xml-js": "^1.6.11",
"xml-query": "^1.5.0",
"xml-reader": "^2.4.3",
"xml2json": "^0.12.0",
"xmldom": "^0.3.0",
"xpath": "^0.0.27"
}
}

Re: NodeScriptExecutor.js.map

Posted: Mon Aug 24, 2020 12:40 am
by Sunnyland
Sure thing,
Please see the contents of my package.json file

{
"name": "nodejs-job-arrived2",
"version": "0.0.0",
"description": "NodejsJobArrived2",
"main": "main.js",
"author": {
"name": ""
},
"dependencies": {
"easy-soap-request": "^3.3.3",
"express": "^4.17.1",
"fetch": "^1.1.0",
"fs-extra": "^9.0.1",
"node-fetch": "^2.6.0",
"soap": "^0.33.0",
"xml-js": "^1.6.11",
"xml-query": "^1.5.0",
"xml-reader": "^2.4.3",
"xml2json": "^0.12.0",
"xmldom": "^0.3.0",
"xpath": "^0.0.27"
}
}

Re: NodeScriptExecutor.js.map

Posted: Mon Aug 24, 2020 9:10 am
by Padawan
I'm sorry, I meant the launch.json file (it is in your .vscode) folder. I don't know the file names by hard yet in the new scripting engine.

Re: NodeScriptExecutor.js.map

Posted: Mon Aug 24, 2020 9:27 am
by Sunnyland
All good. The whole lot is a learning curve for me. This is the launch.json file.

{ // Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "attach",
"name": "Attach",
"skipFiles": [
"<node_internals>/**"
],
"port": 9229
}
]
}

Pretty much just copied the recommended settings.

Re: NodeScriptExecutor.js.map

Posted: Mon Aug 24, 2020 9:52 am
by Padawan
That also looks normal to me. I think it is best to first check the basics.

- Have the script in a Switch flow
- Set debug to yes in the script element
- make sure the entry point you want to test is in "debug entry points"
- activate the flow
- If you want to test the jobarrived entry point, make sure there is a job before the script element
- Only now click the button in VS code to start debugging.

Does this fix the issue?

If not, then create a new sscript with a new main.js file with only the bare minimum of functionality. Then
- Test if that works
- If it works, add one small piece of functionality you have in your full script
- Test if that works
- Continue until it stops working. The last thing you added will have caused the problem.

Re: NodeScriptExecutor.js.map

Posted: Mon Aug 31, 2020 6:59 pm
by dkelly
Sunnyland wrote: Fri Aug 21, 2020 8:03 am ENOENT: no such file or directory, open 'c:\Program Files\Enfocus\Enfocus Switch\ScriptExecutor\NodeScriptExecutor.js.map'
The source map file (.map) contains debugger information. It's optional and the warning can be ignored.

I doubt the Enfocus wants to disclose the source code to that script.

Re: NodeScriptExecutor.js.map

Posted: Mon Aug 31, 2020 11:29 pm
by Sunnyland
Thanks for that. I have been ignoring the message, it’s good to know that it isn’t affecting anything