You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm building a new plugin that needs to access the filesystem and spawn child processes. But npm run dev throws an error when I import and use either of these modules.
How to replicate:
clone this repo
add import { spawn } from 'child_process'; to main.ts (note, that this alone does not cause the issue)
add spawn("something") to onload()
npm run dev
The error I get is main.ts:2:29: error: Could not resolve "child_process" (use "platform: 'node'" when building for node)
Is this related to #11 and the switch to ESBuild instead of Rollup? <-- I don't understand any of this, but I do notice that all the other plugins that use child_process and fs refer to rollup in package.json instead of esbuild.
The text was updated successfully, but these errors were encountered:
I'm building a new plugin that needs to access the filesystem and spawn child processes. But
npm run dev
throws an error when I import and use either of these modules.How to replicate:
import { spawn } from 'child_process';
tomain.ts
(note, that this alone does not cause the issue)spawn("something")
toonload()
npm run dev
The error I get is
main.ts:2:29: error: Could not resolve "child_process" (use "platform: 'node'" when building for node)
Is this related to #11 and the switch to ESBuild instead of Rollup? <-- I don't understand any of this, but I do notice that all the other plugins that use
child_process
andfs
refer torollup
inpackage.json
instead ofesbuild
.The text was updated successfully, but these errors were encountered: