Cli: [BUG] ERR_INVALID_PACKAGE_TARGET

Created on 27 Apr 2020  路  3Comments  路  Source: netlify/cli

Hello,

I would like to report an issue preventing me from using Netlify-CLI.
Any help please ?

Steps to reproduce:

  1. brew install netlify-cli
  2. netlify init

I tried to uninstall and install few times. Without any success.
Works fine when using a package manager.

Error:
Error [ERR_INVALID_PACKAGE_TARGET]: Invalid "exports" main target "index.js" defined in the package config /usr/local/Cellar/netlify-cli/2.48.0/libexec/lib/node_modules/netlify-cli/node_modules/is-promise/package.json at Object.<anonymous> (/usr/local/Cellar/netlify-cli/2.48.0/libexec/lib/node_modules/netlify-cli/node_modules/run-async/index.js:3:17)

Version:
System: OS: macOS 10.15.4 CPU: (8) x64 Intel(R) Core(TM) i7-8569U CPU @ 2.80GHz Binaries: Node: 14.0.0 - /usr/local/bin/node Yarn: 1.22.4 - /usr/local/bin/yarn npm: 6.14.4 - /usr/local/bin/npm Browsers:Safari: 13.1 netlify-cli/2.48.0 darwin-x64 node-v14.0.0

Most helpful comment

brew install -s netlify-cli fixed it for me. I think the issue is that the 'bottle' was built between the release of is-promise 2.2.0 and 2.2.2

All 3 comments

brew install -s netlify-cli fixed it for me. I think the issue is that the 'bottle' was built between the release of is-promise 2.2.0 and 2.2.2

Reinstalling has not fixed the problem for me. Can you push a new version?

Solved it with

  1. brew uninstall netlify-cli
  2. brew install -s netlify-cli
Was this page helpful?
0 / 5 - 0 ratings