shakacode / re-formality

Form validation tool for reason-react
https://re-formality.now.sh
MIT License
244 stars 36 forks source link

Request: Support for arm64 #108

Closed mightystrong closed 2 years ago

mightystrong commented 2 years ago

Requesting that re-formality work with arm64. User docker to build a container using the Docker desktop app for Apple M1 chip.

#22 59.73 error /build/client/node_modules/re-formality: Command failed.
#22 59.73 Exit code: 1
#22 59.73 Command: node ./postinstall.js
#22 59.73 Arguments:
#22 59.73 Directory: /build/client/node_modules/re-formality
#22 59.73 Output:
#22 59.73 re-formality-ppx does not support this platform :(
#22 59.73
#22 59.73 re-formality-ppx comes prepacked as built binaries to avoid large
#22 59.73 dependencies at build-time.
#22 59.73
#22 59.73 If you want re-formality-ppx to support this platform natively,
#22 59.73 please open an issue at our repository, linked above. Please
#22 59.73 specify that you are on the linux platform,
#22 59.73 on the arm64 architecture.
#22 59.73 fs.js:125
#22 59.73     throw err;
#22 59.73     ^
#22 59.73
#22 59.73 Error: ENOENT: no such file or directory, copyfile 'bin/re-formality-ppx-linux-arm64.exe' -> 'ppx'
#22 59.73     at Object.copyFileSync (fs.js:1782:3)
#22 59.73     at copyFileSync (/build/client/node_modules/re-formality/postinstall.js:49:8)
#22 59.73     at Object.<anonymous> (/build/client/node_modules/re-formality/postinstall.js:42:5)
#22 59.73     at Module._compile (internal/modules/cjs/loader.js:759:30)
#22 59.73     at Object.Module._extensions..js (internal/modules/cjs/loader.js:770:10)
#22 59.73     at Module.load (internal/modules/cjs/loader.js:628:32)
#22 59.73     at Function.Module._load (internal/modules/cjs/loader.js:555:12)
#22 59.73     at Function.Module.runMain (internal/modules/cjs/loader.js:826:10)
#22 59.73     at internal/main/run_main_module.js:17:11
#22 59.73 info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
#22 60.34 error Command failed with exit code 1.
mightystrong commented 2 years ago

Hope this helps others...

I was able to get to build using the buildx command and by specifying the platform.

docker buildx build --platform linux/amd64 -t yourimagename .

It's possible you may need to add RUN npm config set unsafe-perm true after installing node to prevent the error in this thread from stopping the build.

mightystrong commented 2 years ago

Closing this out. Appears to be resolved by 4.0.0-beta.16