![](/img/trans.png)
[英]How to start a nodejs project with only index.js and package.json and node modules files
[英]Ember mismatch names in index.js and package.json
我的package.json
和index.js
有兩個不同的名稱,我無法在兩個地方更改它們。 我收到此錯誤。
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.
我的 ember-cli 版本是"ember-cli": "~3.28.3"
我通常在我的插件中這樣做:
module.exports = {
name: require('./package').name,
}
這樣,即使重命名,它們也始終匹配。
問題是您的 package.json 名稱是@copilot/copilot-seo-score
,但您在 index.js 中的名稱是copilot-seo-score
並且它們需要匹配。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.