Skip to content

deprecation id: ember-string.add-packag does not go away when applying suggested fix #20377

@st-h

Description

@st-h

🐞 Describe the Bug

After upgrading to 4.10 I am seeing thousands of deprecation messages

DEPRECATION: Importing from `@ember/string` without having the `@ember/string` package in your project is deprecated. Please add `@ember/string` to your `package.json [deprecation id: ember-string.add-package] This will be removed in ember-source 5.0.0. See https://deprecations.emberjs.com/v4.x/#toc_ember-string-add-package for more details.
        at logDeprecationStackTrace (http://localhost:4200/assets/vendor.js:16199:21)
        at HANDLERS.<computed> (http://localhost:4200/assets/vendor.js:16322:9)
        at raiseOnDeprecation (http://localhost:4200/assets/vendor.js:16225:9)
        at HANDLERS.<computed> (http://localhost:4200/assets/vendor.js:16322:9)
        at invoke (http://localhost:4200/assets/vendor.js:16331:9)
        at deprecate (http://localhost:4200/assets/vendor.js:16298:28)
        at deprecateImportFromInternalString (http://localhost:4200/assets/vendor.js:27379:47)
        at Object.dasherize (http://localhost:4200/assets/vendor.js:27281:5)
        at normalizeModelName (http://localhost:4200/assets/vendor.js:78133:19)

However, I have "@ember/string": "^3.0.1" in devDependencies of my package.json.

After discussing this issue in discord, it seems that for some reason the ember implementation of the string functions is being invoked instead of the ones that are contained in @ember/string

There has been a comment, describing similar behaviour in another issue: emberjs/ember-string#235 (comment)
In my case I am seeing this issue in the browser, but not on the fastboot server

I have also opened an issue over at @ember/string: emberjs/ember-string#370

However, it seems that it would also be necessary to fix the misleading deprecation message

🔬 Minimal Reproduction

Describe steps to reproduce. If possible, please, share a link with a minimal reproduction.

😕 Actual Behavior

Thousands of deprecation warnings are printed

🤔 Expected Behavior

When the fix described in the deprecation message is applied, thousands of deprecation warning would no longer be printed

🌍 Environment

  • Ember: 4.10
  • Node.js/npm: -
  • OS: -
  • Browser: -

➕ Additional Context

Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions