Skip to main content
Bruce Bullis
Community Manager
Community Manager
September 26, 2017
Question

Moving from CEP7 to CEP8 will require changes to Node.js usage

  • September 26, 2017
  • 3 replies
  • 1902 views

[Apologies for broad distribution.]

Hello, potential CEP panel developers!

Changes to CEP's Node.js handling are required, between CEP7 and CEP8; this will break existing Node.js usage, in CEP extensions.

We apologize in advance for the breaking change; we wouldn't make these changes if they weren't required to maintain Adobe's security standards.

Good news: While CEP8 applications are not yet available, we can provide a good understanding of the required changes, today.

Attached are a migration guide, and additional details about Node.js enablement in various JavaScript contexts; the information you'll need to make your existing panels compatible with forthcoming CEP8 hosts.

If you'd like to test your panels in CEP8 applications, either reach out to your product team contacts, or go here to apply for pre-release access to applications which rely upon CEP8: https://www.adobeprerelease.com

This topic has been closed for replies.

3 replies

Inspiring
October 23, 2017

How will get requirejs. I am getting an error for requirejs in extensions after updating Illustrator.

Łukasz Markowski
Inspiring
November 3, 2017
According to CEP8 documentation:
require path is absolute instead of relative

Nodejs 7.7.4 requires path to be included as absolute path. So, if you have nodejs require for the js file,replace the path to absolute instead of relative. For eg. replace:

require("./js/lib/jquery.js");

with

Win require absolute path for nodejs

var loc = window.location.pathname; var dir = decodeURI(loc.substring(1, loc.lastIndexOf('/'))); require(dir + "/js/lib/jquery.js");

In Mac (there is a change in index passed on to substring)

Mac require absolute path for nodejs

var loc = window.location.pathname; var dir = decodeURI(loc.substring(0, loc.lastIndexOf('/'))); require(dir + "/js/lib/jquery.js");  (or)  require(__dirname + "/js/lib/jquery.js");
Davide_Barranca12040269
Legend
September 29, 2017

Hi Bruce Bullis thanks for this!

Is it just me or the link at the bottom of the page ("JS Contexts in CEP when nodejs is enabled") is not really a link pointing to a page?

Thanks again

Davide Barranca - PS developer and authorwww.ps-scripting.com
Trevor:
Legend
September 27, 2017

Thanks for posting Bruce.

Future post like this will also be appreciated