1

While loading a local JSON file in my ReactJS project written in typescript, I am getting an error like file not found in path provided.

The code I am currently using:

var data = require('./Localisation string.json')
Console.log(data);

The console.log is empty.

rickvdbosch
  • 14,105
  • 2
  • 40
  • 53

1 Answers1

0

From this,

You should try below code:

var data = require('json!./data.json');
Rajendra arora
  • 2,186
  • 1
  • 16
  • 23