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
...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?
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:
Component | CEP 6.1 and CEP 7.0 | CEP 8.0 | CEP 9.0 |
---|---|---|---|
CEF 3 | CEF 3 release branch 2272 Commit e8e1f98ee026a62778eb2269c8e883426db645ea | CEF 3 release branch 2987 | CEF 3 release branch 3163 |
Chromium | 41.0.2272.104 | 57.0.2987.74 | 61.0.3163.91 |
Node.js | IO.js 1.2.0 | Node.js 7.7.4 | Node.js 8.6.0 |
CEF/Node integration | Node-WebKit 0.12.1 (nw.js) | Node-Webkit 0.21.5 | Node-Webkit 0.25 |
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?
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!
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?
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.
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.
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:
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
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
Windows
Could you help or guide why this error is coming. Or is it possible to use sqlite3 within plugins or not?
Copy link to clipboard
Copied
I just updated my OS to Catalina and then my debug quit working on CC 2019. So then I tried migrating to CC 2021 and the debugger is working however I am getting the same error as user Charu Rajput. Do you have to upgrade to CEP10 to work on 2021 or am I barking up the wrong tree?