Comments (6)
I even put it in the html, how do I integrate this child process thing?
from bolt-cep.
For anyone else who finds this thread, child_process
is a built-in node module so it doesn't require bundling.
In Bolt, you can import with import { child_process } from "../lib/node";
from bolt-cep.
Wait, I tried doing that and it's giving me this error:
src/js/lib/node.ts:15:20 - error TS2307: Cannot find module 'child_process' or its corresponding type declarations.
15 ) as typeof import("child_process");
from bolt-cep.
For the now the error went away, and I am getting a proper build by adding nodeTypes to vite config in (resolve/alias):
{ find: '@nodeTypes', replacement: path.resolve(__dirname, 'node_modules/@types/node') }
and replacing child_process with "@nodeTypes/child_process"
.
However I will have to use some kind of placeholder to run in the web since the node stuff only runs within Adobe.
Anyway, thanks for the help
from bolt-cep.
Are you running Node.js 16 or up? The /lib/node.ts
file already does that by returning a blank object if you're in the browser or the node module if you're in a node environment.
from bolt-cep.
Node version: v16.13.1
from bolt-cep.
Related Issues (20)
- Audition support HOT 5
- Add Support for Audition, Media Encoder, InDesign, and Bridge
- The <extension name> extension could not be loaded because it was not properly signed. HOT 1
- Cant't acess .jsx files
- removeEventListener obj parameter not set as optional
- How to get this working in NextJS? HOT 1
- zxp password included as raw text in build bundle HOT 2
- API requests HOT 1
- Package.json should inherit extension name
- Cannot build with 2 panels in cep.config.ts HOT 5
- Types for Adobe stop at v22.0 HOT 1
- "TypeError: undefined is not an object" when calling evalEs HOT 3
- [Question] Using HMR within Adobe apps? HOT 1
- How to add pollyfils from es5 to ppro or etc
- jsx strings are garbled(jsx字符串乱码问题) HOT 2
- WASM modules not found but only in Production Build HOT 1
- copyAssets when `npm run dev` not only when building HOT 1
- Including config.id from cep.config.ts cause the config bundled in browser code
- Add pnpm as well
- KeyInterest not working
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bolt-cep.