Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
ghost opened this issue Jun 18, 2017 · 30 comments
Labels
🏷️ bug This PR primarily fixes a reported issue

Comments

@ghost
Copy link

ghost commented Jun 18, 2017

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/
@runspired
Copy link
Contributor

runspired commented Jun 19, 2017

Likely this means that linting is running before transpilation completes.

@rwjblue
Copy link
Member

rwjblue commented Jun 19, 2017

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

@runspired
Copy link
Contributor

@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.

@rwjblue
Copy link
Member

rwjblue commented Jun 20, 2017

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

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

@rwjblue
Copy link
Member

rwjblue commented Jun 20, 2017

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).

@runspired
Copy link
Contributor

@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.

@qarthandgi
Copy link

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

@mminkoff
Copy link

I'm seeing this in [email protected]

@jtstrohl
Copy link

jtstrohl commented Jun 29, 2017

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

@kumkanillam
Copy link

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.

@syntaxval
Copy link

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 ...

Matt-Jensen added a commit to devotox/ember-cli-g-maps that referenced this issue Jul 8, 2017
Matt-Jensen pushed a commit to Matt-Jensen/ember-cli-g-maps that referenced this issue Jul 8, 2017
* Update to remove bower dependency + Fastboot compatibility

* Update to remove bower dependency + Fastboot compatibility

* lock to 0.5.15 gmaps tag

* Rerun tests

* replace gmaps-for-apps github tag dependency with an npm module

* add travis wait to npm install to fix emberjs/data#5016

* move travis wait to build script and allow beta fail

* increase travis wait on build to 30 minutes for ember-lts-2.4
@boztek
Copy link

boztek commented Jul 10, 2017

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

@huberb
Copy link

huberb commented Jul 10, 2017

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

@abbasovalex
Copy link

abbasovalex commented Jul 13, 2017

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.

@yawboakye
Copy link

@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 👉 here

@robertbenjamin
Copy link

Also getting this warning.

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

@GitSahib
Copy link

Getting the same error for dev env.

version: 2.3.0
node: 6.10.1
os: win32 x64

@stefanpenner
Copy link
Member

Getting the same error for dev env.

You mean warning right?

@Vinchens00-zz
Copy link

Vinchens00-zz commented Aug 8, 2017

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.

@GitSahib
Copy link

GitSahib commented Aug 8, 2017 via email

@GitSahib
Copy link

GitSahib commented Aug 8, 2017

ember 2.3.2
ember data 2.14.9
jquery 2.1.1

@zhisme
Copy link

zhisme commented Aug 14, 2017

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"

@mcfiredrill
Copy link
Contributor

Seeing this on a fresh ember app.

ember: 2.15.0-beta.3
ember-data: 2.15.0-beta.4
jquery: 3.2.1

@notmessenger
Copy link

ember-cli: 2.12.3
node: 7.10.1
os: darwin x64
"ember-data": "2.14.10"

@joehany
Copy link

joehany commented Aug 23, 2017

node: 7.7.3
ember-cli: 2.14.2
ember-data: 2.14.9

@stefanpenner
Copy link
Member

stefanpenner commented Aug 23, 2017

should be fixed by #5114 (which is pending some unit tests)

@stefanpenner
Copy link
Member

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

@jontoewsdev
Copy link

jontoewsdev commented Sep 16, 2017

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 ?

@xomaczar
Copy link
Contributor

This has been fixed, we should close this issue

@bmac
Copy link
Member

bmac commented Oct 11, 2017

Thanks @xomaczar.

@bmac bmac closed this as completed Oct 11, 2017
@runspired runspired added 🏷️ bug This PR primarily fixes a reported issue and removed Bug labels Sep 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bug This PR primarily fixes a reported issue
Projects
None yet
Development

No branches or pull requests