Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
1

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

Adobe Employee ,
Sep 26, 2017 Sep 26, 2017

[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

1.9K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guru ,
Sep 27, 2017 Sep 27, 2017

Thanks for posting Bruce.

Future post like this will also be appreciated

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 29, 2017 Sep 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 author
www.ps-scripting.com
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Oct 23, 2017 Oct 23, 2017

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Nov 03, 2017 Nov 03, 2017
LATEST
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");
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines