nkt / atom-autocomplete-modules

Autocomplete for require/import statements
https://atom.io/packages/autocomplete-modules
MIT License
114 stars 35 forks source link

Not working after 2.1.3 update #115

Closed judewang closed 6 years ago

judewang commented 6 years ago

Description

Autocomplete feature's not working after the 2.1.3 update. Version 2.1.2 works as expected.

Maybe #111 can fix #110, but generated another issue 😔

Steps to Reproduce

  1. On version 2.1.2 I am getting autocomplete suggestions.
  2. After updating to any version above 2.1.2, I am not getting autocomplete suggestions.

Expected behavior: To actually work

Actual behavior: Not working

Reproduces how often: Every time after updating

Console errors

/Users/jude/.atom/packages/atom-beautify/node_modules/bluebird/js/release/promise.js:10 Uncaught (in promise) TypeError: expecting an array or an iterable object but got [object Null]
    at apiRejection (/Users/jude/.atom/packages/atom-beautify/node_modules/bluebird/js/release/promise.js:10)
    at MappingPromiseArray.init (/Users/jude/.atom/packages/atom-beautify/node_modules/bluebird/js/release/promise_array.js:63)
    at MappingPromiseArray._asyncInit (/Users/jude/.atom/packages/atom-beautify/node_modules/bluebird/js/release/map.js:30)
    at Async._drainQueue (/Users/jude/.atom/packages/atom-beautify/node_modules/bluebird/js/release/async.js:138)
    at Async._drainQueues (/Users/jude/.atom/packages/atom-beautify/node_modules/bluebird/js/release/async.js:143)
    at Async.drainQueues (/Users/jude/.atom/packages/atom-beautify/node_modules/bluebird/js/release/async.js:17)
    at <anonymous>

Versions

Atom : 1.31.0 Electron: 2.0.7 Chrome : 61.0.3163.100 Node : 8.9.3

apm 2.1.1 npm 6.2.0 node 8.9.3 x64 atom 1.31.0 python 2.7.10 git 2.18.0

macOS 10.13.6

Additional Information

I'm not using Babel Plugin Module Resolver.

jonyeezs commented 6 years ago

Hi @judewang, thanks for putting the issue ticket.

It's difficult to cater to all scenarios when the maintainers don't use all of them personally.

Could you help provide your folder structure (if its too big, then just where it counts from the root) And the import statement.

eg (or however you best can describe it):

 |
 |-package.json
 |\
 | \folder1
    |-file.js
    |-someother.js
# file.js
# | denoting cursor or an image would be best
import {| } from 'folder1/someother'
judewang commented 6 years ago

@jonyeezs thanks for replying, here's my folder structure:

|
|-package.json
|\
|  \src
   |\
   |  \components
      |\
      | \Button
          |-Button.js
# Button.js
import React from '|'

I used to type r than Atom shows react as autocomplete suggestion, but there were no suggestion after upgrading.

jonyeezs commented 6 years ago

Just before we continue,

The error you've shown is of a different package. So not sure if it's related.

Could you help ensure the following:

judewang commented 6 years ago

@jonyeezs Hi, I tried to uninstall both autocomplete-module and atom-beautify and only re-install autocomplete-module v2.2.0. Then I found the error log was almost the same, but this time was about autocomplete-module.

image
jonyeezs commented 6 years ago

Hi @judewang, I've made some changes to hopefully mitigate the problem you're experiencing.

This may not fix it but atleast put us in a good position to debug further.

Could you please install package version 2.2.1 and test again.

Thank you!

judewang commented 6 years ago

Hi @jonyeezs, 2.2.1 fixed the issue, but pop upped sidebar alerts every time after I typed something inside ' ' 😂

image
jonyeezs commented 6 years ago

@judewang check your settings, ensure you have webpack and babel plugin switched off to have it not show.

I'm closing this issue. If the pop-up is not the best experience, with the settings enabled, we can open another ticket for that.

Thanks for all your help!