1

well i am not getting any answers to this error .. npm update to latest and downgrade also tried. nothing works package.json so it i get some help ...

{
  "name": "kelsnew",
  "version": "0.1.0",
  "private": true,
  "devDependencies": {
    "jest-expo": "~27.0.0",
    "react-native-scripts": "^1.14.1",
    "react-test-renderer": "16.3.1"
  },
  "main": "./node_modules/react-native-scripts/build/bin/crna-entry.js",
  "scripts": {
    "start": "react-native-scripts start",
    "eject": "react-native-scripts eject",
    "android": "react-native-scripts android",
    "ios": "react-native-scripts ios",
    "test": "jest"
  },
  "dependencies": {
    "expo": "^28.0.0",
    "jest": "^23.4.1",
    "react": "16.3.1",
    "react-native": "^0.56.0"
  }
}

2 Answers 2

3

I tried several things and several things in combination, but ultimately when I added @babel to my .babelrc plugin line without any other changes. I then deleted node_modules, package-lock.json and ran npm install.

{
  "presets": ["babel-preset-expo"],
  "env": {
    "development": {
      "plugins": ["@babel/transform-react-jsx-source"]
    }
  }
}

I also upgraded from Nodejs 8 to 10 along the way (and stayed there). I don't think it material, but I mention it just in case, check your node --version.

Sign up to request clarification or add additional context in comments.

Comments

1

Check your app.js for any calls to the property filename such as someObject.filename, this is most likely due to some object not being instantiated and thus you are getting undefined.filename which throws an error.

2 Comments

well its not that..i try to make another project from scratch and getting errors ..
@JayanaSoneji hmmmm... can you edit your original post to include the app.js file so I can take a look?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.