Highlighted

InDesign Extension sqlite3 looking in the wrong folder

Engaged ,
May 14, 2019

Copy link to clipboard

Copied

const sqlite3 = require('sqlite3');

I am trying to use sqlite's module but it keeps looking in the wrong folder.

Node v10.0.0

NPM v6.9.0

Error: Cannot find module '/Library/Application Support/Adobe/CEP/extensions/QPP/node_modules/sqlite3/lib/binding/node-v57-darwin-x64/node_sqlite3.node'

Is the error I am getting.

The module is here

/Library/Application Support/Adobe/CEP/extensions/QPP/node_modules/sqlite3/lib/binding/node-v64-darwin-x64/node_sqlite3.node

So I need it to look in node-v64-darwin-x64 for the correct version how do I do that?

curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.0/install.sh | bash

then use nvm use 8.6

use --delete-prefix v8.6.0

then I could install my module npm install sqlite3.

This worked because it then installs it in the

/Library/Application Support/Adobe/CEP/extensions/QPP/node_modules/sqlite3/lib/binding/node-v57-darwin-x64/node_sqlite3.node

I should be able to switch versions of node with the node version manager.

Can you tell me when Adobe will be updating there node version? And or when they will be ES6 compliant?

Topics

Exchange

Views

2.6K

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

InDesign Extension sqlite3 looking in the wrong folder

Engaged ,
May 14, 2019

Copy link to clipboard

Copied

const sqlite3 = require('sqlite3');

I am trying to use sqlite's module but it keeps looking in the wrong folder.

Node v10.0.0

NPM v6.9.0

Error: Cannot find module '/Library/Application Support/Adobe/CEP/extensions/QPP/node_modules/sqlite3/lib/binding/node-v57-darwin-x64/node_sqlite3.node'

Is the error I am getting.

The module is here

/Library/Application Support/Adobe/CEP/extensions/QPP/node_modules/sqlite3/lib/binding/node-v64-darwin-x64/node_sqlite3.node

So I need it to look in node-v64-darwin-x64 for the correct version how do I do that?

curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.0/install.sh | bash

then use nvm use 8.6

use --delete-prefix v8.6.0

then I could install my module npm install sqlite3.

This worked because it then installs it in the

/Library/Application Support/Adobe/CEP/extensions/QPP/node_modules/sqlite3/lib/binding/node-v57-darwin-x64/node_sqlite3.node

I should be able to switch versions of node with the node version manager.

Can you tell me when Adobe will be updating there node version? And or when they will be ES6 compliant?

Topics

Exchange

Views

2.6K

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Engaged ,
May 14, 2019

Copy link to clipboard

Copied

I just updated to node version 10.15.3 but it did not help. I wonder what happens at the runtime that makes it look at that folder?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Engaged ,
May 14, 2019

Copy link to clipboard

Copied

CEP HTML engine is based on Chromium Embedded Framework version 3 (CEF3). You can find more information about CEF here. Here are the versions used in CEP:

ComponentCEP 6.1 and CEP 7.0CEP 8.0CEP 9.0
CEF 3CEF 3 release branch 2272
Commit e8e1f98ee026a62778eb2269c8e883426db645ea
CEF 3 release branch 2987CEF 3 release branch 3163
Chromium41.0.2272.10457.0.2987.7461.0.3163.91
Node.jsIO.js 1.2.0Node.js 7.7.4Node.js 8.6.0
CEF/Node integrationNode-WebKit 0.12.1 (nw.js)Node-Webkit 0.21.5Node-Webkit 0.25

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Engaged ,
May 14, 2019

Copy link to clipboard

Copied

Do I have to go back to Node version 8.6 to get this to compile to the right folder?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Adobe Employee ,
May 14, 2019

Copy link to clipboard

Copied

Hi @bagonterman!

I think you do, if you're using InDesign 2019, like in this chart: CEP-Resources/CEP 9.0 HTML Extension Cookbook.md at master · Adobe-CEP/CEP-Resources · GitHub

Let us know if it works!

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Engaged ,
May 14, 2019

Copy link to clipboard

Copied

curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.0/install.sh | bash

then use nvm use 8.6

use --delete-prefix v8.6.0

then I could install my module npm install sqlite3.

This worked because it then installs it in the

/Library/Application Support/Adobe/CEP/extensions/QPP/node_modules/sqlite3/lib/binding/node-v57-darwin-x64/node_sqlite3.node

I should be able to switch versions of node with the node version manager.

Can you tell me when Adobe will be updating there node version? And or when they will be ES6 compliant?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Adobe Employee ,
May 15, 2019

Copy link to clipboard

Copied

bagonterman  wrote


Can you tell me when Adobe will be updating there node version? And or when they will be ES6 compliant?

This is a big topic! Right now, panels are built using CEP 9, which, as you know, is compatible with a certain version of node.  CEP 9 came out around Adobe MAX last year. Although the CEP team might do a CEF upgrade at some point, there are not currently plans for CEP 10.

Instead, we've begun a major transition from CEP to an ES6 compliant platform called UXP. UXP is being implemented on a product-by-product basis. There is not a date for InDesign to begin using UXP at this time. Several other products will come first.

If you'd like to get news in advance, please join our Creative Cloud Developer prerelease program. Also, follow the Adobe Tech Blog​ and/or sign up for the monthly developer newsletter.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Engaged ,
May 17, 2019

Copy link to clipboard

Copied

Do you have information about UXP on the Adobe website? I do not want to sign up for Medium.com.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Adobe Employee ,
May 20, 2019

Copy link to clipboard

Copied

Hi bagonterman,

You shouldn't have to sign in or sign up to medium.com to read that article. Here is a "Friend Link" that ought to guarantee you can read it.

Unfortunately that's the only page with UXP information at the moment, but we hope to have more articles about it soon, and better support pages. To give you some idea, here are the Adobe XD docs. Adobe XD's APIs are built on UXP, which is continuing to evolve.  XD's documentation doesn’t yet differentiate between “UXP APIs” and “Xd APIs,” so, for now, the easiest way to make the distinction is this:

  • UI and anything that looks like a Node or Web API is UXP.
  • File I/O and anything behind require("uxp") is also UXP.
  • Everything else is XD. (commands, scenegraph, application, etc.)

I hope this is helpful!

I'm not pleased with medium.com either, and hope that we will eventually migrate the Tech Blog content to a new home. However, that is unlikely within this calendar year.

Kind Regards,

Erin

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Adobe Community Professional ,
Apr 12, 2020

Copy link to clipboard

Copied

Hello,

I have one one question related to this. I am creating server in Indeisgn plugin and try to sue sqlite or better-sqlite3 node module. My node version is 8.6.0 and using CEP 9.0. When I try to require sqlite3 or better-squilte3. I can following errors on windows and mac. Please See screenshots for error

 

MAC

 

Screenshot 2020-04-12 at 6.57.18 PM.png

 

Windows

image_2020_04_11T07_13_07_793Z.png

Could you help or guide why this error is coming. Or is it possible to use sqlite3 within plugins or not?

Best regards

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...