In macbook m1 pro 2021, ventura 13.5 I have a project that I developed in typescript. It uses yarn, it's supposed to work fine when I do
yarn build
yarn install
yarn start
my versions:
`yarn -v
1.22.19`
` npm -v
9.8.1
`
`node -v
v20.5.0
These are the versions and I need to use couchbase version 3.2.1
I think that the problem is with macbook m1 chip, but not sure
when I do yarn build
it gives this output:
> yarn run v1.22.19
> $ rimraf dist
> $ nest build
> DeprecationWarning: blabla
> ✨ Done in 3.73s.
and then I run the command yarn install
but it gives this output and then it blocks me to run yarn start
command:
> yarn install v1.22.19
> [1/4] 🔍 Resolving packages...
> [2/4] 🚚 Fetching packages...
> [3/4] 🔗 Linking dependencies...
> some warnings about nestjs, eslint, tsloader etc.
> [4/4] 🔨 Building fresh packages...
> [6/7] ⠂ @nestjs/core
> [-/7] ⠂ waiting...
> 3/7] ⠂ couchbase
> [-/7] ⠂ waiting...
> warning Error running install script for optional dependency: "/Users/user1/project1/node_modules/@newrelic/native-metrics: Command failed.
> Exit code: 1
> Command: node ./lib/pre-build.js install native_metrics
> Arguments:
> Directory: /Users/user1/project1/node_modules/@newrelic/native-metrics
> Output:
> ============================================================================
> Attempting install in native-metrics module. Please note that this is an
> OPTIONAL dependency, and any resultant errors in this process will not
> affect the general performance of the New Relic agent, but event loop and
> garbage collection metrics will not be collected.
> ============================================================================
> [6/7] ⡀ @nestjs/core
> [-/7] ⡀ waiting...
> [3/7] ⡀ couchbase
> [-/7] ⡀ waiting...
> error /Users/user1/project1/node_modules/couchbase: Command failed.
> Exit code: 127
> Command: prebuild-install || node-gyp rebuild
> Arguments:
> Directory: /Users/user1/project1/node_modules/couchbase
I tried this one: https://github.com/tj/n and I tried many other solutions but I couldn't find a solution.
use node 18,
in order to not to uninstall node 20, just install nvm in your local, how to
then use node 18 like follows
nvm use 18
then do same commands for the rest, such as yarn install, build etc...