Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Mac compatibility issues caused by the
node-sass
in Mac arm
p…
…rocessors (#340) ### What Fix Mac compatibility issues caused by the `node-sass` in Mac `arm` processors. ### Why When attempting to run `yarn install`, the `node-sass` package returns the following error, when executing from a ac with `arm` processor: ```text [4/4] 🔨 Building fresh packages... [-/3] ⠠ waiting... [2/3] ⠠ node-sass error /Users/marcelosantos/Workspace/stellar-demo-wallet/node_modules/node-sass: Command failed. Exit code: 1 Command: node scripts/build.js Arguments: Directory: /Users/marcelosantos/Workspace/stellar-demo-wallet/node_modules/node-sass Output: Binary found at /Users/marcelosantos/Workspace/stellar-demo-wallet/node_modules/node-sass/vendor/darwin-arm64-108/binding.node Testing binary Binary has a problem: Error: dlopen(/Users/marcelosantos/Workspace/stellar-demo-wallet/node_modules/node-sass/vendor/darwin-arm64-108/binding.node, 0x0001): tried: '/Users/marcelosantos/Workspace/stellar-demo-wallet/node_modules/node-sass/vendor/darwin-arm64-108/binding.node' (not a mach-o file), '/System/Volumes/Preboot/Cryptexes/OS/Users/marcelosantos/Workspace/stellar-demo-wallet/node_modules/node-sass/vendor/darwin-arm64-108/binding.node' (no such file), '/Users/marcelosantos/Workspace/stellar-demo-wallet/node_modules/node-sass/vendor/darwin-arm64-108/binding.node' (not a mach-o file) at Module._extensions..node (node:internal/modules/cjs/loader:1338:18) at Module.load (node:internal/modules/cjs/loader:1117:32) at Module._load (node:internal/modules/cjs/loader:958:12) at Module.require (node:internal/modules/cjs/loader:1141:19) at require (node:internal/modules/cjs/helpers:110:18) at module.exports (/Users/marcelosantos/Workspace/stellar-demo-wallet/node_modules/node-sass/lib/binding.js:19:10) at Object.<anonymous> (/Users/marcelosantos/Workspace/stellar-demo-wallet/node_modules/node-sass/lib/index.js:13:35) at Module._compile (node:internal/modules/cjs/loader:1254:14) at Module._extensions..js (node:internal/modules/cjs/loader:1308:10) at Module.load (node:internal/modules/cjs/loader:1117:32) { code: 'ERR_DLOPEN_FAILED' } Building the binary locally Building: /Users/marcelosantos/.nvm/versions/node/v18.16.0/bin/node /Users/marcelosantos/Workspace/stellar-demo-wallet/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library= /Users/marcelosantos/Workspace/stellar-demo-wallet/node_modules/wide-align/align.js:2 var stringWidth = require('string-width') ^ Error [ERR_REQUIRE_ESM]: require() of ES Module /Users/marcelosantos/Workspace/stellar-demo-wallet/node_modules/string-width/index.js from /Users/marcelosantos/Workspace/stellar-demo-wallet/node_modules/wide-align/align.js not supported. Instead change the require of index.js in /Users/marcelosantos/Workspace/stellar-demo-wallet/node_modules/wide-align/align.js to a dynamic import() which is available in all CommonJS modules. at Object.<anonymous> (/Users/marcelosantos/Workspace/stellar-demo-wallet/node_modules/wide-align/align.js:2:19) at Object.<anonymous> (/Users/marcelosantos/Workspace/stellar-demo-wallet/node_modules/gauge/lib/render-template.js:2:13) at Object.<anonymous> (/Users/marcelosantos/Workspace/stellar-demo-wallet/node_modules/gauge/lib/plumbing.js:3:22) at Object.<anonymous> (/Users/marcelosantos/Workspace/stellar-demo-wallet/node_modules/gauge/lib/index.js:2:16) at Object.<anonymous> (/Users/marcelosantos/Workspace/stellar-demo-wallet/node_modules/npmlog/lib/log.js:3:13) at Object.<anonymous> (/Users/marcelosantos/Workspace/stellar-demo-wallet/node_modules/node-gyp/lib/node-gyp.js:5:13) at Object.<anonymous> (/Users/marcelosantos/Workspace/stellar-demo-wallet/node_modules/node-gyp/bin/node-gyp.js:8:13) { code: 'ERR_REQUIRE_ESM' } Node.js v18.16.0 ```
- Loading branch information