TodayILearned

TIL… How to Resolve false-positive ESLint Errors

So a colleague of mine was struggling with our local build process. Every time he ran the npm command, which ran a webpack build, He’d get numerous errors for ‘import/no-unresolved’. The associated message would complain that the file casing did not match the underlying file system.

As it turns out, the warning was technically correct. When we checked his command line, we found that the interface reported the folder name with a lowercase. To be clear the folder, as it existed in the file system, was capitalized. So we spun up a new CLI, and tried it with a capitalized version of the folder. Lo and behold, it worked perfectly.

Be sure to check your CLI, when a command returns with very odd errors.

Advertisements
Standard

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s