question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Setup with Vue Native Cli does not work

See original GitHub issue

I am following the steps provided here -> https://vue-native.io/docs/installation.html The commands I am running:

  1. npm install -g vue-native-cli
  2. vue-native init myproject // Initializes crna project
  3. cd myproject
  4. npm install
  5. npm start: 5a. starts metro bundler with text:

INFO 23:49 Starting Metro Bundler on port 19001. INFO 23:49 Metro Bundler ready.

  1. I scan the Qr code with my iphone camera. 6.a expo app opens and the red screen with error on is there and my metro bundler writes:

ERROR 23:52 Unable to resolve “…/…/App” from “node_modules/expo/AppEntry.js” ERROR 23:52 Building JavaScript bundle: error

Content of my rn-cli.config.js (autogenerated):


module.exports = {
  getTransformModulePath() {
    return require.resolve("./vueTransformerPlugin.js");
  },
  getSourceExts() {
    return ["vue"];
  }
};

Content of my vueTransformerPlugin.js (autogenerated):


var semver = require('semver');
var vueNaiveScripts = require("vue-native-scripts");
var reactNativeVersionString = require("react-native/package.json").version;
var reactNativeMinorVersion = semver(reactNativeVersionString).minor;

if (reactNativeMinorVersion >= 56) {
  upstreamTransformer = require("metro/src/reactNativeTransformer");
} else if (reactNativeMinorVersion >= 52) {
  upstreamTransformer = require("metro/src/transformer");
} else if (reactNativeMinorVersion >= 47) {
  upstreamTransformer = require("metro-bundler/src/transformer");
} else if (reactNativeMinorVersion === 46) {
  upstreamTransformer = require("metro-bundler/build/transformer");
} else {
  // handle RN <= 0.45
  var oldUpstreamTransformer = require("react-native/packager/transformer");
  upstreamTransformer = {
    transform({ src, filename, options }) {
      return oldUpstreamTransformer.transform(src, filename, options);
    }
  };
}
var vueExtensions = ["vue"]; // <-- Add other extensions if needed.

module.exports.transform = function({ src, filename, options }) {
  if (vueExtensions.some(ext => filename.endsWith("." + ext))) {
    return vueNaiveScripts.transform({ src, filename, options });
  }
  return upstreamTransformer.transform({ src, filename, options });
};


Content of node_modules/expo/AppEntry.js:


import { KeepAwake, registerRootComponent } from 'expo';
import App from '../../App';

if (__DEV__) {
  KeepAwake.activate();
}

registerRootComponent(App);

My package.json file:


{
  "name": "empty-project-template",
  "main": "node_modules/expo/AppEntry.js",
  "private": true,
  "scripts": {
    "start": "expo start",
    "android": "expo start --android",
    "ios": "expo start --ios",
    "eject": "expo eject"
  },
  "dependencies": {
    "expo": "^30.0.1",
    "react": "16.3.1",
    "react-native": "https://github.com/expo/react-native/archive/sdk-30.0.0.tar.gz",
    "vue-native-core": "0.0.8",
    "vue-native-helper": "0.0.9"
  },
  "devDependencies": {
    "vue-native-scripts": "0.0.14"
  }
}

My computer is a macbook 15 from 2018 and my OS is macOS High Sierra version 10.13.6 What am I doing wrong?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:13
  • Comments:43 (17 by maintainers)

github_iconTop GitHub Comments

3reactions
croossincommented, Nov 27, 2018

I was able to easily fix the issue locally with this response.

3reactions
neeraj-singh47commented, Nov 23, 2018

There’s a problem with latest version of expo. We’ll release a fix soon.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Setup with Vue Native Cli does not work #101 - GitHub
I solved this problem. It worked by rewriting rn-cli.config.js to the contents of the following comment. ... Reactive Native 57+ seems to need ......
Read more >
Installation - Vue Native
Install Vue Native CLI globally with the following command: ... The above command will run your app in development mode with an interactive...
Read more >
Vue Native installation failed with Vue Native CLI
But has the error following as and my first application doesn't start. Unable to resolve "../../App" from "node_modules/expo/AppEntry.js".
Read more >
How to Install Vue Native? - GeeksforGeeks
Step 1: First lets Install React Native CLI globally on your computer · Step 2: Now to test let's create a new project...
Read more >
Install Vue.js directly on Windows | Microsoft Learn
A guide to help you set up a Vue.js development environment on Windows. ... Vue CLI is a toolkit for working with Vue...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found