aristanetworks / aristanetworks/purescript-backend-optimizer

spawn esbuild ENOENT

Open
#104 4 comments 1 reaction 0 assignees View on GitHub
Dominant language
PureScript
Stars
216
Forks
24
Avg merge
8m
Merged PRs (30d)
2

Description

```
> pnpm exec purs-backend-es bundle-module --no-build

node:events:497
throw er; // Unhandled 'error' event
^

Error: spawn esbuild ENOENT
at ChildProcess._handle.onexit (node:internal/child_process:286:19)
at onErrorNT (node:internal/child_process:484:16)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
Emitted 'error' event on ChildProcess instance at:
at ChildProcess._handle.onexit (node:internal/child_process:292:12)
at onErrorNT (node:internal/child_process:484:16)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
errno: -4058,
code: 'ENOENT',
syscall: 'spawn esbuild',
path: 'esbuild',
spawnargs: [
'--platform=browser',
'--format=esm',
'--outfile=index.js',
'--bundle',
'C:\\Users\\John\\Documents\\purescript-2\\output-es\\Main\\index.js'
]
}
```
```
> pnpm ls

dependencies:
esbuild 0.20.2
purescript 0.15.15
purs-backend-es 1.4.2
spago 0.21.0
```
The same with `npm install` and `npm instal --global`.
`pnpm exec spago build` works and `output-es` folder exists.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing `pnpm exec purs-backend-es bundle-module --no-build` on the reported Windows setup, then compare how `pnpm exec spago build` resolves its tools. Trace the `purs-backend-es` bundle entry point and esbuild process launch. Done means the command finds esbuild and completes successfully with the existing `output-es` folder.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
build-system, cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.