deluan / contentful-migrate

🐎 Schema migration tooling for Contentful, with state management
https://www.contentful.com/blog/2018/09/13/content-model-changes-scale-telus-cms-as-code/
MIT License
60 stars 37 forks source link

Getting failed dependency from BaseConfig #89

Open jessefranklin opened 4 years ago

jessefranklin commented 4 years ago

Error: Failed to load config "eslint-config-standard" to extend from. Referenced from: BaseConfig

deluan commented 4 years ago

Hey @jessefranklin sorry for the long delay.

Are you still having this issue? How are you running ctf-migrate? Did you install it as a global package or is it a dev dependency in your project?

mbaranovski commented 4 years ago

I have exactly the same issue. Package installed globally. Running like this: ctf-migrate bootstrap -c "content-type-name" -t "XXXXXXXXX" -s "space-id" -e "dev" I can see that importerPath is defaulting to the directory from which we execute the command + appends placeholder.js file (it's eslint logic)

The error stack:

  🚨  Failed to perform bootstrap : Error: Failed to load config "eslint-config-standard" to extend from.
Referenced from: BaseConfig
Error: Failed to load config "eslint-config-standard" to extend from.
Referenced from: BaseConfig
    at configMissingError (/usr/local/lib/node_modules/contentful-migrate/node_modules/eslint/lib/cli-engine/config-array-factory.js:265:9)
    at ConfigArrayFactory._loadExtendedShareableConfig (/usr/local/lib/node_modules/contentful-migrate/node_modules/eslint/lib/cli-engine/config-array-factory.js:826:23)
    at ConfigArrayFactory._loadExtends (/usr/local/lib/node_modules/contentful-migrate/node_modules/eslint/lib/cli-engine/config-array-factory.js:731:25)
    at ConfigArrayFactory._normalizeObjectConfigDataBody (/usr/local/lib/node_modules/contentful-migrate/node_modules/eslint/lib/cli-engine/config-array-factory.js:660:25)
    at _normalizeObjectConfigDataBody.next (<anonymous>)
    at ConfigArrayFactory._normalizeObjectConfigData (/usr/local/lib/node_modules/contentful-migrate/node_modules/eslint/lib/cli-engine/config-array-factory.js:596:20)
    at _normalizeObjectConfigData.next (<anonymous>)
    at createConfigArray (/usr/local/lib/node_modules/contentful-migrate/node_modules/eslint/lib/cli-engine/config-array-factory.js:340:25)
    at ConfigArrayFactory.create (/usr/local/lib/node_modules/contentful-migrate/node_modules/eslint/lib/cli-engine/config-array-factory.js:395:16)
    at createBaseConfigArray (/usr/local/lib/node_modules/contentful-migrate/node_modules/eslint/lib/cli-engine/cascading-config-array-factory.js:86:48)
    at new CascadingConfigArrayFactory (/usr/local/lib/node_modules/contentful-migrate/node_modules/eslint/lib/cli-engine/cascading-config-array-factory.js:211:30)
    at new CLIEngine (/usr/local/lib/node_modules/contentful-migrate/node_modules/eslint/lib/cli-engine/cli-engine.js:563:36)
    at jsonToScript (/usr/local/lib/node_modules/contentful-migrate/lib/bootstrap/jsonToScript.js:69:18)
    at /usr/local/lib/node_modules/contentful-migrate/lib/bootstrap/generateScripts.js:30:11
    at processTicksAndRejections (internal/process/task_queues.js:94:5)
    at async /usr/local/lib/node_modules/contentful-migrate/node_modules/p-map/index.js:57:15 {
  messageTemplate: 'extend-config-missing',
  messageData: { configName: 'eslint-config-standard', importerName: '' }
}
kweingart08 commented 4 years ago

I'm getting this issue as well. Any fix here?

timreimherr commented 3 years ago

@deluan is there a resolution to this issue? I'm getting this same error.

Jonathan-Wong-Code commented 3 years ago

Same error here too.

deluan commented 3 years ago

@Jonathan-Wong-Code and others having this issue: Can you try running it with npx, like this:

npx contentful-migrate command [params]
Jonathan-Wong-Code commented 3 years ago

No dice. I'm actually getting

Error: BaseConfig » eslint-config-standard: Environment key "es2021" is unknown

    After installing it locally with eslint...googled and it did an npm ls eslint.

Looks like it's running eslint 6.8 which doesn't support es2021. (I'm just using the default Create-react-app setup)

deluan commented 3 years ago

When running contentful-migrate with npx, you should not add it to your package.json. Is that your case?

Jonathan-Wong-Code commented 3 years ago

I've tried both :) same result.

stephenmacnaughtan commented 3 years ago

I'm getting the same error. Tried dev dependency and global, and npx with no luck.

Update: I was able to successfully run yarn ctf-migrate bootstrap from my project after removing eslint from my projects dependencies.

aladage commented 3 years ago

I'm having the same issue. Any updates?

AndrianMauricio commented 3 years ago

Any updates on this issue? I'm experiencing the same.

imrans110 commented 3 years ago

Getting the same issue here as well. I guess no updates yet ?

tonioriol commented 3 years ago

same error here.

I'm getting the same error. Tried dev dependency and global, and npx with no luck.

Update: I was able to successfully run yarn ctf-migrate bootstrap from my project after removing eslint from my projects dependencies.

I was also able to run it after uninstalling eslint from my project depts.

Also, it only happens when running bootstrap. I added back eslint to the package.json and i've been able to run all other commands.

bnadeem commented 2 years ago

Globally running ctf-migrate failed for me too. However when adding it to package.json and using it via npm run migrate -- bootstrap -c banner -s spaceid worked fine. Following is my package.json file

{
  "name": "simple-migrate",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "migrate": "ctf-migrate"
  },
  "author": "",
  "license": "ISC",
  "dependencies": {
    "contentful-migrate": "^0.17.0"
  }
}