0

I'm editing TypeScript using Tide, successfully, except that it complains about every single import statement. For example:

import { GraphQLSchema } from 'graphql';

I see an error in the minibuffer:

Module 'graphql' is not listed as dependency in package.json [no-implicit-dependencies]

My repository layout is like so:

<repository root>
\-- service
  +-- package.json
  +-- tslint.yml
  \-- src
    \-- something.ts

If I go and open up the package.json file it's right there, and if I run tslint outside Emacs or in a *shell* buffer it works fine. All of the other type checking works fine and I happily get JavaScript type errors, it's just this one complaint, almost as if it's not finding package.json where it expects.

0

This turns out to have been a known issue in flycheck and updating to the melpa version of flycheck fixes it. (My .emacs file prefers melpa-stable packages, even though they can be mildly dated. I think I need a version from at least 20180309, but “stable” version 31 is from 7 Oct 2017.)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.