Paket can't run npm script as build command on Windows (Git Bash)
Nobody has claimed this yet.
- Dominant language
- F#
- Stars
- 2.1k
- Forks
- 528
- Avg merge
- 1d 12m
- Merged PRs (30d)
- 54
Description
Description
I have a git dependency in paket.dependencies that has build: "npm run pack nupkg", packages: nupkg.
npm run pack, for brevity, is configured to restore npm, paket, build project and run paket pack with the argument as path folder (nupkg in my case).
On Linux it works, on Windows (Git Bash), it fails and I can't get what to do to workaround it.
Repro steps
My projects are netcoreapp3.1, B referencing A.
paket.dependencies in B:
git git.mappa.info:Mappa/Mappa.Extensions.Web master build: "npm run pack nupkg", packages: nupkg
nuget Mappa.Extensions.Web
scritp available in package.json in A:
"pack": "npm i && npm run restore && npm run build -- -c Release && npm run paket -- pack --lock-dependencies"
Expected behavior
Like in Linux:
Paket version 5.245.2
Starting full restore process.
Checking for uncommitted changes in /home/josevero/Git/Mappa/paket-files/git.mappa.info/Mappa/Mappa.Extensions.Web
Checking for commits made in detached HEAD state in /home/josevero/Git/Mappa/paket-files/git.mappa.info/Mappa/Mappa.Extensions.Web
Setting /home/josevero/Git/Mappa/paket-files/git.mappa.info/Mappa/Mappa.Extensions.Web to 696f6b11a4adfdc458827a383d1b4385b2879138
Running "npm run pack nupkg"
Performance:
- Runtime: 12 seconds
Actual behavior
But in Windows:
Paket version 5.245.2
Starting full restore process.
Checking for uncommitted changes in D:\Git\Mappa\paket-files\git.mappa.info\Mappa\Mappa.Extensions.Web
Checking for commits made in detached HEAD state in D:\Git\Mappa\paket-files\git.mappa.info\Mappa\Mappa.Extensions.Web
Setting D:\Git\Mappa\paket-files\git.mappa.info\Mappa\Mappa.Extensions.Web to 696f6b11a4adfdc458827a383d1b4385b2879138
Running "npm run pack nupkg"
Performance:
- Runtime: 2 seconds
Paket failed with
-> Could not run "npm run pack nupkg".
Error: Start of process npm failed.
Known workarounds
I can't found any workaround.
Contributor guide
No contributing guide indexed for this repository
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.
Research direction
Reproduce the dependency in paket.dependencies on Windows using Git Bash, with the package.json script that runs npm run pack nupkg. Trace Paket's build-command execution path and verify that the command starts successfully and completes as it does on Linux.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- fsharp, javascript
- Domain
- build-system, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100