简体   繁体   中英

Ember mismatch names in index.js and package.json

i have two different names in my package.json and index.js which i cannot change on both places. I am getting this error.

ember-cli: Your names in package.json and index.js should match. The addon in /Users/nrehman/Projects/copilot-seo-score currently have '@copilot/copilot-seo-score' in package.json and 'copilot-seo-score' in index.js. Until ember-cli v3.9, this error can be disabled by setting env variable EMBER_CLI_IGNORE_ADDON_NAME_MISMATCH to "true". For more information about this workaround, see: https://github.com/ember-cli/ember-cli/pull/7950.

My ember-cli version is "ember-cli": "~3.28.3"

I normally do this in my addons:

module.exports = {
  name: require('./package').name,
}

that way, they always match, even if renamed.

The issue is that your package.json name is @copilot/copilot-seo-score , but your name in index.js is copilot-seo-score and they need to match.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM