Data: ember-data 2.14.0: 'instrument' is imported from external module 'ember-data/-debug' but never used

Created on 18 Jun 2017  Â·  30Comments  Â·  Source: emberjs/data

Launching application:

$ ember s
Livereload server on http://localhost:49153
'instrument' is imported from external module 'ember-data/-debug' but never used

Build successful (31681ms) – Serving on http://localhost:4200/
Bug

Most helpful comment

This error will not do any harm to your application, and it has been fixed in [email protected]. Upcoming release of Ember CLI will include the fix.
This has been mentioned in ember-cli 2.13.3 release notes.

All 30 comments

Likely this means that linting is running before transpilation completes.

FWIW, linting _should always_ be ran before transpilation. I guarantee that babels transpiled output would not pass most apps linting rules. 😃

@rwjblue all of our instrument import locations are used. This suggests to me that linting occurs after something strips the usage but before another transform strips the left-behind import itself.

'instrument' is imported from external module 'ember-data/-debug' but never used

This is not a linting error. This is a rollup thing.

This is almost certainly because we run things through babel before passing them to rollup. The import should be stripped by the babel plugin if all usages are removed (to get rid of this error).

@rwjblue we have a babel plugin to strip pre-rollup, but it only runs in prod. Heimdall though is stripped all the time unless the flag is set. Might just need to reconfigure this to avoid polluting folks with this error.

Same Issue. What's the way to fix this?

I'm seeing this in [email protected]

Seeing the same in [email protected] when running 'ember server' on brand new application on brand new installation of node and ember:

$ ember -v
ember-cli: 2.13.3
node: 6.11.0
os: darwin x64

This error will not do any harm to your application, and it has been fixed in [email protected]. Upcoming release of Ember CLI will include the fix.
This has been mentioned in ember-cli 2.13.3 release notes.

ember-cli: 2.14.0
node: 6.11.0
os: darwin x64

'instrument' is imported from external module 'ember-data/-debug' but never used

Still there ...

I can confirm that this warning is still displayed but only for development builds.
ember s -prod and ember build -prod do not display the warning.

ember-cli: 2.14.0
node: 6.11.0
os: darwin x64

I'm using ruby on rails and the ember-rails gem
i get the same error, but on rails it's not only a warning but triggers the rails error page

which looks like this but with the error from OP
https://stackoverflow.com/questions/25219164/is-it-possible-to-catch-ruby-on-rails-error-pages-and-do-my-own-error-handling

since i also use pow and not ember serve (dont know if this would be possible with rails) i can't just add the -prod flag and forget about it.

I'm trying to get ember and rails to run together since some hours and it seems like this bug is the last thing that is preventing me from using an ember app in my rails app

Same problem:
$ ember -v
ember-cli: 2.15.0-beta.1
node: 8.0.0
os: darwin x64

Anybody could fix it? All my projects were broken :( I tried install several version of ember-cli, but could not fixed it.

@abbasovalex that error/warning shouldn't be able to halt your project. If that's happening it's most likely a different problem. If you're already part of the Ember Slack community, let's continue the conversation there. Otherwise get an invitation :point_right: here

Also getting this warning.

ember-cli: 2.14.1
node: 7.10.0
os: darwin x64

Getting the same error for dev env.

version: 2.3.0
node: 6.10.1
os: win32 x64

Getting the same error for dev env.

You mean warning right?

I'm still seeing the same warning:

ember -v
ember-cli: 2.14.2
node: 6.10.0
os: darwin x64

I got this error when I upgraded ember-cli from 2.13.3 to 2.14.0. I changed next versions in package.json:
ember-cli 2.13.3 -> 2.14.0
ember-cli-htmlbars: ^1.2.0 -> ^2.0.1
ember-cli-htmlbars-inline-precompile: ^0.4.0 -> ^0.4.3
ember-data: 2.13.2 -> 2.14.3
ember-source: 2.13.3 -> 2.14.0

Hope it helps.
Production build also shows this warning.

Do you have any estimation when this issue will be fixed?

PS: I also got 2 different warnings after upgrade:
Warning: ignoring input sourcemap for vendor/ember/ember.debug.js because ENOENT: no such file or directory, open '/Users/path/to/project/tmp/source_map_concat-input_base_path-lKNqChEH.tmp/vendor/ember/ember.debug.map'
Warning: ignoring input sourcemap for vendor/ember/ember-testing.js because ENOENT: no such file or directory, open '/Users/path/to/project/tmp/source_map_concat-input_base_path-tA6vglG0.tmp/vendor/ember/ember-testing.map'

But I guess it's not related to this issue.

I have ember 2.3

On Tue, Aug 8, 2017 at 7:59 AM, Vinchens00 notifications@github.com wrote:

I'm still seeing the same warning:

ember -v
ember-cli: 2.14.2
node: 6.10.0
os: darwin x64

I got this error when I updated ember-cli from 2.13.3 to 2.14.0. I changed
next versions in package.json:
ember-cli 2.13.3 -> 2.14.0
ember-cli-htmlbars: ^1.2.0 -> ^2.0.1
ember-cli-htmlbars-inline-precompile: ^0.4.0 -> ^0.4.3
ember-data: 2.13.2 -> 2.14.3
ember-source: 2.13.3 -> 2.14.0

Hope it helps.
Production build also shows this warning.

Do you have any estimation when this issue will be fixed?

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/emberjs/data/issues/5016#issuecomment-320934388, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AQavosGqqlF4VcPz6O6PEEx7Mf1UFrHyks5sWE21gaJpZM4N9dld
.

ember 2.3.2
ember data 2.14.9
jquery 2.1.1

Same here.
'instrument' is imported from external module 'ember-data/-debug' but never used

ember-cli: 2.6.2
node: 6.9.2
os: darwin x64
"ember-data": "2.14.10"

Seeing this on a fresh ember app.

ember: 2.15.0-beta.3
ember-data: 2.15.0-beta.4
jquery: 3.2.1
ember-cli: 2.12.3
node: 7.10.1
os: darwin x64
"ember-data": "2.14.10"
node: 7.7.3
ember-cli: 2.14.2
ember-data: 2.14.9

should be fixed by https://github.com/emberjs/data/pull/5114 (which is pending some unit tests)

@runspired said he would look to add tests tonight, once those land. We can backport and release :)

Anyone resolve this?

What's up with all these?

ember-data/lib/stripped-build-plugins.js: uniqueAdd(filteredImports, 'ember-data/-debug', ['instrument']);
ember-data/lib/stripped-build-plugins.js: uniqueAdd(filteredImports, 'ember-data/-debug', [
ember-data/lib/stripped-build-plugins.js: plugins.push([StripFilteredImports, 'ember-data/-debug']);
ember-data/addon/-private/system/relationships/state/belongs-to.js:import { assertPolymorphicType } from 'ember-data/-debug';
ember-data/addon/-private/system/relationships/state/has-many.js:import { assertPolymorphicType } from 'ember-data/-debug';
ember-data/addon/-private/system/store.js:import { instrument } from 'ember-data/-debug';
ember-data/addon/-private/system/references/belongs-to.js:import { assertPolymorphicType } from 'ember-data/-debug';
ember-data/addon/-private/system/references/has-many.js:import { assertPolymorphicType } from 'ember-data/-debug';
ember-data/addon/adapters/rest.js:import { instrument } from 'ember-data/-debug';
ember-data/addon/adapters/json-api.js:import { instrument } from 'ember-data/-debug';

Something not quite right about that.

Is it suppose to be ember-data/broccoli-debug ?

This has been fixed, we should close this issue

Thanks @xomaczar.

Was this page helpful?
0 / 5 - 0 ratings