Terrasoft Incognito
04/19/2022, 7:28 PMact-node@10.17.2: Pact Binary Error: .../node_modules/@pact-foundation/pact-node/standalone/darwin-1.88.83/pact/lib/ruby/bin/ruby: line 14: .../node_modules/@pact-foundation/pact-node/standalone/darwin-1.88.83/pact/lib/ruby/lib/ruby/gems/2.2.0: No such file or directory
Everything works on Windows, but right now I need to run it on mac M1
I will grateful for any advise
I also tried a V3 version (but still interesting on not beta option)
pact-foundation/pact@beta
with another kind of error:
npm WARN deprecated fastify-warning@0.2.0: This module renamed to process-warning
npm ERR! code 1
npm ERR! path /...project_path/node_modules/@pact-foundation/pact-core
npm ERR! command failed
npm ERR! command sh -c node-gyp rebuild
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@8.4.1
npm ERR! gyp info using node@16.14.0 | darwin | x64
npm ERR! gyp info find Python using Python version 3.8.9 found at "/Library/Developer/CommandLineTools/usr/bin/python3"
npm ERR! gyp info spawn /Library/Developer/CommandLineTools/usr/bin/python3
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args '...nvm_path/versions/node/v16.14.0/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args 'binding.gyp',
npm ERR! gyp info spawn args '-f',
npm ERR! gyp info spawn args 'make',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/...project_path/node_modules/@pact-foundation/pact-core/build/config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '...nvm_path/versions/node/v16.14.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '...lib_path/Library/Caches/node-gyp/16.14.0/include/node/common.gypi',
npm ERR! gyp info spawn args '-Dlibrary=shared_library',
npm ERR! gyp info spawn args '-Dvisibility=default',
npm ERR! gyp info spawn args '-Dnode_root_dir=...lib_path/Library/Caches/node-gyp/16.14.0',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=...nvm_path/versions/node/v16.14.0/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=...lib_path/Library/Caches/node-gyp/16.14.0/<(target_arch)/node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=/...project_path/node_modules/@pact-foundation/pact-core',
npm ERR! gyp info spawn args '-Dnode_engine=v8',
npm ERR! gyp info spawn args '--depth=.',
npm ERR! gyp info spawn args '--no-parallel',
npm ERR! gyp info spawn args '--generator-output',
npm ERR! gyp info spawn args 'build',
npm ERR! gyp info spawn args '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! Traceback (most recent call last):
npm ERR! File "...nvm_path/versions/node/v16.14.0/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py", line 45, in <module>
npm ERR! sys.exit(gyp.script_main())
npm ERR! File "...nvm_path/versions/node/v16.14.0/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 662, in script_main
npm ERR! return main(sys.argv[1:])
npm ERR! File "...nvm_path/versions/node/v16.14.0/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 654, in main
npm ERR! return gyp_main(args)
npm ERR! File "...nvm_path/versions/node/v16.14.0/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 639, in gyp_main
npm ERR! generator.GenerateOutput(flat_list, targets, data, params)
npm ERR! File "...nvm_path/versions/node/v16.14.0/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py", line 2455, in GenerateOutput
npm ERR! writer.Write(
npm ERR! File "...nvm_path/versions/node/v16.14.0/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py", line 798, in Write
npm ERR! self.WriteActions(
npm ERR! File "...nvm_path/versions/node/v16.14.0/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py", line 1005, in WriteActions
npm ERR! assert " " not in input, (
npm ERR! AssertionError: Spaces in action input filenames not supported (/...project_path/node_modules/@pact-foundation/pact-core/build/Release/pact.node)
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: `gyp` failed with exit code: 1
npm ERR! gyp ERR! stack at ChildProcess.onCpExit (...nvm_path/versions/node/v16.14.0/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:259:16)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:520:28)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
npm ERR! gyp ERR! System Darwin 21.2.0
npm ERR! gyp ERR! command "...nvm_path/versions/node/v16.14.0/bin/node" "...nvm_path/versions/node/v16.14.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd /...project_path/node_modules/@pact-foundation/pact-core
npm ERR! gyp ERR! node -v v16.14.0
npm ERR! gyp ERR! node-gyp -v v8.4.1
npm ERR! gyp ERR! not ok
Yousaf Nabi (pactflow.io)
uname -m
This is running in arm64
mode on my m1 mbp, also montery 12.3.1
❯ uname -m
arm64
❯ node -v
v16.13.1
❯ cat package.json | grep -e pact
"test:pact": "cross-env CI=true react-scripts test --testTimeout 30000 pact.spec.js"
"@pact-foundation/pact": "^9.17.2",
"@pact-foundation/pact-node": "^10.17.1",
then yarn install
[4/4] 🔨 Building fresh packages...
success Saved lockfile.
✨ Done in 43.36s.
❯ find . -name pact-mock-service
./node_modules/.bin/pact-mock-service
./node_modules/@pact-foundation/pact-node/standalone/darwin-1.88.83/pact/bin/pact-mock-service
./node_modules/@pact-foundation/pact-node/standalone/darwin-1.88.83/pact/lib/vendor/ruby/2.2.0/bin/pact-mock-service
./node_modules/@pact-foundation/pact-node/standalone/darwin-1.88.83/pact/lib/vendor/ruby/2.2.0/gems/pact-mock_service-3.9.0/bin/pact-mock-service
./node_modules/@pact-foundation/pact/node_modules/.bin/pact-mock-service
Yousaf Nabi (pactflow.io)
Yousaf Nabi (pactflow.io)
Yousaf Nabi (pactflow.io)
Terrasoft Incognito
04/19/2022, 7:54 PMTerrasoft Incognito
04/19/2022, 7:54 PMTerrasoft Incognito
04/19/2022, 7:55 PMYousaf Nabi (pactflow.io)
Terrasoft Incognito
04/19/2022, 9:02 PMsoftwareupdate --install-rosetta
But I suppose it dost not relate to the problemYousaf Nabi (pactflow.io)
Yousaf Nabi (pactflow.io)
.zshrc
so that if I use the alias axbrew
I can download x86_64 packages from brew.
The other flag passes in the platform flag to docker run and build otherwise I just had problems, I seem to be in a happy place now whether everything is working across both, I rarely use the rosetta shell.
# useful only for Mac OS Silicon M1,
# still working but useless for the other platforms
docker() {
if [[ `uname -m` == "arm64" ]] && [[ "$1" == "run" || "$1" == "build" ]]; then
/usr/local/bin/docker "$1" --platform linux/amd64 "${@:2}"
else
/usr/local/bin/docker "$@"
fi
}
# for intel x86_64 brew
alias axbrew='arch -x86_64 /usr/local/homebrew/bin/brew'%
Yousaf Nabi (pactflow.io)
Terrasoft Incognito
04/19/2022, 9:21 PMYousaf Nabi (pactflow.io)
rm -rf node_modules
to nuke it, before a reinstall if things have gone bork.
Is your npm installation completing under the x86_64 arch?
but failing under v3?
and the same issues seen when trying under arm64?Terrasoft Incognito
04/19/2022, 9:53 PMMatt (pactflow.io / pact-js / pact-go)
npm ERR! AssertionError: Spaces in action input filenames not supported (/...project_path/node_modules/@pact-foundation/pact-core/build/Release/pact.node)
Matt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
npm i --verbose
output? (attach a file)Matt (pactflow.io / pact-js / pact-go)
Terrasoft Incognito
04/20/2022, 9:20 AMAssertionError: Spaces in action input filenames not supported
In case with path without spaces:
With stable version - working as expected both for x86_64 and arm64
With beta version - installation also correct
In case of spaces:
Logs for stable and beta version I attached