Skip to content

TypeScript json import in with-typescript example doesn't work even in js files #9883

@talentlessguy

Description

@talentlessguy

Bug report

Describe the bug

When I try to import json in a js file, I get resolve error

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

  1. Create a typescript project create-next-app --example with-typescipt app
  2. Try to import json (import { version } from '../package.json')

Expected behavior

it should import json without any problems because json resolution is set to true by default in tsconfig.json

Screenshots

If applicable, add screenshots to help explain your problem.

System information

  • OS: Manjaro Linux 5.4.2
  • Version of Next.js: 9.1.6

Additional context

typescript version: 3.7.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueEasy to fix issues, good for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions