me ako
me ako

Reputation: 1

I don't understand why it is having this error. Even if the directory is correct and also the filename

IMAGE OF THE ERROR

Android Bundling failed 5334ms

Unable to resolve module ../model/weights.bin from D:\Repos\BANANAFILE\helpers\tensor-helper.js:

None of these files exist:

10 |

11 | const modelJson = require('../model/model.json');

12 | const modelWeights = require('../model/weights.bin');

Upvotes: 0

Views: 617

Answers (1)

carlosdafield
carlosdafield

Reputation: 1537

React-native uses es6 imports so do this instead

import modelJson from "../model/model.json"
import modelWeights from "../model/weights.bin"

Upvotes: 0

Related Questions