Closed mtsbarbosa closed 1 year ago
Mh, I cannot seem to be able to reproduce it :(
Btw, browser-or-node
is a sub-dependency (@datocms/cli
-> @datocms/cma-client-node
-> browser-or-node
), so that's why you don't see it in package.json
$ nvm install 17
Downloading and installing node v17.9.1...
Downloading https://nodejs.org/dist/v17.9.1/node-v17.9.1-darwin-x64.tar.xz...
Now using node v17.9.1 (npm v8.11.0)
$ nvm use 17
Now using node v17.9.1 (npm v8.11.0)
$ npm install -g @datocms/cli
added 200 packages, and audited 201 packages in 11s
33 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
$ datocms --help
CLI to interact with DatoCMS APIs
VERSION
@datocms/cli/1.0.20 darwin-x64 node-v17.9.1
$ datocms migrations:new 'create article model' --api-token=XXX
Writing "migrations/1670064548_createArticleModel.js"... done
Hi @stefanoverna sorry, the problem in the end was that I installed the datocms cli using node 11 (with nvm) after installing, you have the cli totally bounded to the node you picked during the installation and you are unable to make it work in another So I had to go to the node_modules folder from .nvm and delete the datocms cli, reinstalling that at the right node version Not sure if there is something to be done here, probably not, feel free to close it in that case3
My version:
When running
datocms migrations:new 'create article model'
the following error occurs:Indeed, I dont see browser-or-node as a dependency in the
package.json
ofdatocms@cli