Open vajahath opened 6 months ago
What I ended up doing is yarn patch raspi-i2c
to remove the post install script - but then executed it myself after installation. Wired - but worked. I don't consider this as a solution. In my case I was lucky that the post install script was updating a system setting. Once it is updated, not needed unless it is a new system.
adding logs here:
pi@raspberrypi:~/Desktop/projects/pi-room $ yarn patch raspi-i2c
➤ YN0000: Package raspi-i2c@npm:6.2.4 got extracted with success!
➤ YN0000: You can now edit the following folder: /tmp/xfs-f88bc8ee/user
➤ YN0000: Once you are done run yarn patch-commit -s /tmp/xfs-f88bc8ee/user and Yarn will store a patchfile based on your changes.
➤ YN0000: Done in 0s 312ms
pi@raspberrypi:~/Desktop/projects/pi-room $ nano /tmp/xfs-f88bc8ee/user/package.json
<I removed the post install script>
pi@raspberrypi:~/Desktop/projects/pi-room $ yarn patch-commit -s /tmp/xfs-f88bc8ee/user
pi@raspberrypi:~/Desktop/projects/pi-room $ yarn install
➤ YN0000: · Yarn 4.1.1
➤ YN0000: ┌ Resolution step
➤ YN0085: │ + raspi-i2c@patch:raspi-i2c@npm%3A6.2.4#~/.yarn/patches/raspi-i2c-npm-6.2.4-51f7bc8830.patch::version=6.2.4&hash=beac24
➤ YN0000: └ Completed in 0s 454ms
➤ YN0000: ┌ Fetch step
➤ YN0013: │ A package was added to the project (+ 55.45 KiB).
➤ YN0000: └ Completed in 1s 66ms
➤ YN0000: ┌ Link step
➤ YN0000: │ ESM support for PnP uses the experimental loader API and is therefore experimental
➤ YN0000: └ Completed in 0s 509ms
➤ YN0000: · Done with warnings in 2s 457ms
pi@raspberrypi:~/Desktop/projects/pi-room $
Self-service
Describe the bug
The
raspi-i2c
has a post install script, in which, the script requires a packageini-builder
. Yarn 4 is unable to resolve thisini-builder
package even though it is specified in the package.json file ofraspi-i2c
.With npm, it works.
To reproduce
Demonstrates the failure (this is executed inside raspberry pi):
The same - I can install with npm
I tried explicitly adding the
ini-builder
before addingraspi-i2c
. Still it does not work:Environment
Additional context
Any workaround is appreciated for the time being. But a real fix is much more appreciated.
Let me know if you need any further info.