Copy link to clipboard
Copied
I can’t get Node.js to work – but I need filesystem access. I double and triple checked the manifest, documentations and existing threads...
I included enable-nodejs to the manifest and iFrame
Then I do
var fs = require(‘fs’)
but I get ‘copyFileSync is not a function’ when I try to use fs.
Any help is highly appreciated!
Already solved it myself through the manifest. Make sure that
1. The tag <ExtensionManifest> and <RequiredRuntime> have the attribute Version="7.0"
2. Make sure the required <CEFCommandLine> tag with its child is within the <Resources> tag. In some Adobe examples it's wrong.
Copy link to clipboard
Copied
You need mixed-content
<CEFCommandLine>
<Parameter>--enable-nodejs</Parameter>
<Parameter>--mixed-context</Parameter>
</CEFCommandLine>
From the md
Accessing nodejs APIs in iframe
nodejs symbols will not be available in iframe's global context, only way you can access nodejs APIs within iframe's context is through cep_node. When --mixed-context is enabled, global node symbols and cep_node is available within iframe's global context as browser and node gets executed at the same context. It is also important to note that, if you have existing code to check or use nodejs symbols in iframe's global context, it used to work till last release and in the current release, it breaks in separate context mode.
Copy link to clipboard
Copied
Hi and thanks for your answer!
But even though I have both parameters defined, I just see for example CSEvent, CSInterface, VulcanInterface or cep in the global and frame context. I think I'm still missing something, but I have no clue...
It wouldn't have anything to do with me using jQuery and Angular...??
Copy link to clipboard
Copied
Already solved it myself through the manifest. Make sure that
1. The tag <ExtensionManifest> and <RequiredRuntime> have the attribute Version="7.0"
2. Make sure the required <CEFCommandLine> tag with its child is within the <Resources> tag. In some Adobe examples it's wrong.