Building from source doesn't seem to work
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 48/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- javascript
Research direction
Reproduce the source-build fallback with node index.js --purs-ver=0.15.7, then inspect index.js around taskGroups, getCurrentTask at line 308, and the task transition at line 376. The fix is complete when the fallback no longer throws while selecting the build task and the installer output remains coherent through the build process.
Written by the indexing model from the issue text.
Description
I was trying to force the installer to build PureScript from source by modifying supportedPlatforms (removing all platforms) and architecture check (so it would always be false). When doing so, the installer fails with the following output:
/.../npm-installer (master*=) % node index.js --purs-ver=0.15.7
✖ Check if a prebuilt 0.15.7 binary is provided for linux
No prebuilt PureScript binary is provided for x64 architecture.
See troubleshooting suggestions in https://github.com/purescript/purescript/blob/master/INSTALL.md
▬ Download the prebuilt PureScript binary
▬ Verify the prebuilt binary works correctly
▬ Save the downloaded binary to the npm cache directory
↓ Fallback: building from source
/.../npm-installer/node_modules/zen-observable/lib/Observable.js:65
throw e;
^
TypeError: Cannot read properties of undefined (reading 'has')
at getCurrentTask (/.../npm-installer/index.js:308:24)
at Object.next (/.../npm-installer/index.js:376:16)
at notifySubscription (/.../npm-installer/node_modules/zen-observable/lib/Observable.js:135:18)
at onNotify (/.../npm-installer/node_modules/zen-observable/lib/Observable.js:179:3)
at SubscriptionObserver.next (/.../npm-installer/node_modules/zen-observable/lib/Observable.js:235:7)
at Object.next (/.../npm-installer/install-purescript/index.js:89:15)
at notifySubscription (/.../npm-installer/node_modules/zen-observable/lib/Observable.js:135:18)
at onNotify (/.../npm-installer/node_modules/zen-observable/lib/Observable.js:179:3)
at SubscriptionObserver.next (/.../npm-installer/node_modules/zen-observable/lib/Observable.js:235:7)
at /.../npm-installer/download-or-build-purescript/index.js:246:13
Node.js v19.6.1
The problem is somewhat fixed with the following patch (the output would be slightly messed up. I guess there's a better fix):
diff --git a/index.js b/index.js
index 3164858..f6398f8 100755
--- a/index.js
+++ b/index.js
@@ -160,6 +160,13 @@ const taskGroups = [
]
]),
new TaskGroup([
+ [
+ 'head',
+ {
+ head: 'Build from source',
+ status: 'processing'
+ }
+ ],
[
'check-stack',
{
- Dominant language
- JavaScript
- Stars
- 10
- Forks
- 15
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from purescript/npm-installer
-
Difficulty 2/5 1-3 hours Newbie friendliness 55/100
purescript/npm-installer#28 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
purescript/npm-installer#27 · 11 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
purescript/npm-installer#24 · 1 comment · 1 reaction ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
purescript/npm-installer#23 · 2 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 38/100
purescript/npm-installer#22 ·
All issues in purescript/npm-installer
Similar issues
-
[scanner] check:spelling skips blog/ — posts and author metadata are never spell-checkedPossibly taken @hivecommons-hive claimed this today. Openagent/scanner bug hive/covered-by-pr hive/hosted-available-lke648397-260827-5n31
Difficulty 1/5 Under an hour Newbie friendliness 72/100
cncf/endusers#1452 · 1 comment ·
Maintainers usually reply within 1 day
-
Edit: HTVKey.vnOpenchannels:edit check:passed
Difficulty 1/5 Under an hour Newbie friendliness 72/100
Maintainers usually reply within 6 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
beginner bug
Difficulty 1/5 Under an hour Newbie friendliness 88/100
hiero-ledger/hiero-sdk-js#4517 ·
Maintainers usually reply within 1 day
-
`timer` rule rejects dates the engine acceptsPossibly taken @MFA-G claimed this today. Openbug ready
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
camunda/bpmnlint-plugin-camunda-compat#281 · 3 comments ·
Maintainers usually reply within 1 day