amatiasq / vsc-sort-imports

Sort ES6 imports automatically.
ISC License
57 stars 24 forks source link

Sort imports is broken on MacOS in version 6.3.0 (Cannot find module 'lodash.merge') #100

Open VojGin opened 2 years ago

VojGin commented 2 years ago

Since the upgrade to version 6.3.0 the sort imports does not work and outputs this:

2/22/2022, 10:48:55 AM:
-----------------------
Cannot find module 'lodash.merge'
Require stack:
- /Users/username/.vscode/extensions/amatiasq.sort-imports-6.3.0/node_modules/eslint/lib/linter/linter.js
- /Users/username/.vscode/extensions/amatiasq.sort-imports-6.3.0/node_modules/eslint/lib/linter/index.js
- /Users/username/.vscode/extensions/amatiasq.sort-imports-6.3.0/node_modules/eslint/lib/cli-engine/cli-engine.js
- /Users/username/.vscode/extensions/amatiasq.sort-imports-6.3.0/node_modules/eslint/lib/cli-engine/index.js
- /Users/username/.vscode/extensions/amatiasq.sort-imports-6.3.0/node_modules/eslint/lib/api.js
- /Users/username/.vscode/extensions/amatiasq.sort-imports-6.3.0/node_modules/import-sort-style-eslint/lib/index.js
- /Users/username/.vscode/extensions/amatiasq.sort-imports-6.3.0/node_modules/import-sort/lib/index.js
- /Users/username/.vscode/extensions/amatiasq.sort-imports-6.3.0/out/sort.js
- /Users/username/.vscode/extensions/amatiasq.sort-imports-6.3.0/out/extension.js
- /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/loader.js
- /Applications/Visual Studio Code.app/Contents/Resources/app/out/bootstrap-amd.js
- /Applications/Visual Studio Code.app/Contents/Resources/app/out/bootstrap-fork.js

My setup: MacOs Monterey 12.1, Intel based MacBook Pro 16" 2019 Tested on multiple Mac based computers including the M1. Same problem.

Not tested on Linux or Windows.

jiranovaa commented 2 years ago

The same issue here.

sunnylum commented 2 years ago

Yep. Reverted to v6.2.6 and it works again.

amatiasq commented 2 years ago

This is the diff between versions in case someone notice what may be wrong:

https://github.com/amatiasq/vsc-sort-imports/compare/c484b28ed95a9efd4d719dcac49d023ef2419f58...d061630d6ef44dc5bc48e1492277311810eb9228

@kusakawazeusu if we can't find the issue I'll have to revert your PR

@jerome-benoit there are changes from you there too, any insights?

jerome-benoit commented 2 years ago

@jerome-benoit https://github.com/jerome-benoit there are changes from you there too, any insights?

I’m using that version on a daily basis on Mac OS X Monterey at work without any issues at all, like the large team I’m in. So if a few people have issues with that version on MacOS X, they should give a more in depth reproducible pattern of that issue.

I see no point at reverting until the root cause is identified.

-- Jérôme Benoit aka fraggle Piment Noir - https://piment-noir.org OpenPGP Key ID : 27B535D3 Key fingerprint : B799 BBF6 8EC8 911B B8D7 CDBC C3B1 92C6 27B5 35D3

sunnylum commented 2 years ago

Yep. Reverted to v6.2.6 and it works again.

Sorry, I should have been more specific and helpful. I have the same issue on v6.3.0 as reported, and I am on Ubuntu 20.04.

amatiasq commented 2 years ago

@jerome-benoit that version was released 4 days ago

https://github.com/amatiasq/vsc-sort-imports/pull/99#issuecomment-1045595144

wanting to make sure we're both talking about v6.3.0

VojGin commented 2 years ago

This is the diff between versions in case someone notice what may be wrong:

c484b28...d061630

@kusakawazeusu if we can't find the issue I'll have to revert your PR

@jerome-benoit there are changes from you there too, any insights?

The error says Cannot find module lodash.merge. The commit adding lodash.merge to peer dependencies is this one: https://github.com/amatiasq/vsc-sort-imports/commit/c74862da90083a618c46d2d654865857e5f4f7d2 Perhaps that is the culprit.

jerome-benoit commented 2 years ago

@jerome-benoit there are changes from you there too, any insights?

The error says Cannot find module lodash.merge. The commit adding lodash.merge to peer dependencies is this one: c74862d Perhaps that is the culprit.

The commit is adding the dependency, not the other way around.

jerome-benoit commented 2 years ago

@jerome-benoit that version was released 4 days ago

#99 (comment)

wanting to make sure we're both talking about v6.3.0

I've checked before answering, of course.

jerome-benoit commented 2 years ago

c484b28...d061630

The diff here include changes prior do the 6.2.6 release and cover more than 6.2.6 -> 6.3.0 changes.

Could you please before publishing a release:

For now, @amatiasq, could you please do a 6.3.1 release that will be exactly the same as the 6.2.6 release? Right now I can't investigate the issue with the build you've shipped and yarn.lock.

amatiasq commented 2 years ago
DONE  Published amatiasq.sort-imports@6.3.1.

My bad, let me know when you need me to release. Sent you an email to address that.