Error [ERR_INVALID_PACKAGE_TARGET] for yarn create strapi-starter node v14.15.1

System Information
  • Strapi Version: 3.6.0
  • Operating System: Mac OS Big Sur latest version
  • Database:
  • Node Version: v14.15.1
  • NPM Version: 6.14.8
  • Yarn Version: 1.22.5

   $ yarn create strapi-starter sew-ed
yarn create v1.22.5
(node:45423) Warning: Setting the NODE_TLS_REJECT_UNAUTHORIZED environment variable to '0' makes TLS connections and HTTPS requests insecure by disabling certificate verification.
(Use `node --trace-warnings ...` to show where the warning was created)
[1/4] ๐Ÿ”  Resolving packages...
[2/4] ๐Ÿšš  Fetching packages...
[3/4] ๐Ÿ”—  Linking dependencies...
[4/4] ๐Ÿ”จ  Building fresh packages...

success Installed "create-strapi-starter@3.6.0" with binaries:
      - create-strapi-starter
      throw e;

Error [ERR_INVALID_PACKAGE_TARGET]: Invalid "exports" main target "index.js" defined in the package config /Users/andreitosa/.config/yarn/global/node_modules/is-promise/package.json; targets must start with "./"
    at throwInvalidPackageTarget (internal/modules/esm/resolve.js:309:9)
    at resolvePackageTargetString (internal/modules/esm/resolve.js:337:5)
    at resolvePackageTarget (internal/modules/esm/resolve.js:374:12)
    at resolvePackageTarget (internal/modules/esm/resolve.js:420:26)
    at packageExportsResolve (internal/modules/esm/resolve.js:475:22)
    at resolveExports (internal/modules/cjs/loader.js:432:36)
    at Function.Module._findPath (internal/modules/cjs/loader.js:472:31)
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:867:27)
    at Function.Module._load (internal/modules/cjs/loader.js:725:27)
    at Module.require (internal/modules/cjs/loader.js:952:19) {
error Command failed.
Exit code: 1
Command: /usr/local/bin/create-strapi-starter
Arguments: sew-ed
Directory: /Users/andreitosa/andrei-randoms/web_experiments

info Visit for documentation about this command.
1 Like

Iโ€™ve lost all hope for solving this. Iโ€™m lost and have no ideas left on what to do. Please help.

Not sure that your syntax is correctโ€ฆ the strapi starter CLI will take sew-ed as your local folder where the starter will create your final full-stack app, but you donโ€™t have the last command line parm that would indicate what strapi starter repo (on github) to use.

I have an example of the syntax in my boiler plate starter for custom starter development here: GitHub - strapi-training/strapi-starter-to-customize (in the Misc Notes section)

(also, i recently tweeted about my recent video series about custom starters: )

1 Like