Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invoking generator for vue-cli-plugin-nativescript-vue... ERROR Error: Cannot find module '@vue/cli-service/generator/template/src/main.js' #25

Open
XEQTIONR opened this issue Jun 18, 2019 · 11 comments

Comments

@XEQTIONR
Copy link

I was previously able to install this plugin properly, just a few days ago and have everything running. But I keep running into this issue when I try again for a new nativescript vue project.

Error messages look similar for previous issues posted. But references different files here.

1.

The dashboard and plugins tabs are gone now, so I cannot even do it from vue UI

3

Here on a successfully working install previously

2

@scebotari66
Copy link

+1

@ramsesmoreno
Copy link

I manually installed @vue/cli-service and it is working now

npm install --save-dev @vue/cli-service

@luiguild
Copy link

any news here? this problem continues...

@bjornbjorn
Copy link

Tried to get up and running with NativeScript Vue just now and ran into this as well :/

@pratik-soni-einfochips
Copy link

pratik-soni-einfochips commented Nov 21, 2019

I have facing same issue since last 5 days.
I have found the solution for the same.

Please follow below steps to get it resolved.
Please remove npm and npm-cache folder from your computer's below location.

Windows :
C:\Users<username>\AppData\Roaming.

Linux/Ubuntu:
/usr/local

Then Follow below steps
1) npm install -g @vue/[email protected]
2) Go to code sharing project Directory's root folder location where you have package.json
3)npm install --save-dev @vue/[email protected]
4)npm install --save-dev [email protected]
5)vue invoke vue-cli-plugin-nativescript-vue
after that it will ask you for some user input and i provided below inputs.

? Enter a unique application identifier: org.nativescript.application
? Use HTML5 history mode? (Default: hash mode) No
? Is this a brand new project? (Default: Yes) Yes
? Dual Native AND Web development experience or a Native only? (Default: Dual) Dual Native AND Web
? What type of template do you want to start with? (Default: Simple) Simple

Enjoy...

@mklueh
Copy link

mklueh commented Nov 27, 2019

@pratik-soni-einfochips not helping in my case. Any news about some fix for this issue? I would love to try it out somehow

@pratik-soni-einfochips
Copy link

pratik-soni-einfochips commented Nov 28, 2019

@mklueh please help me to get below details.
Which vue version you are using, which OS you are using, Provide your package.json, Please provide error snapshot and last question Have you installed nativescript plugin globally ?

@mklueh
Copy link

mklueh commented Nov 29, 2019

@pratik-soni-einfochips

My OS is Windows 10, have tried it with nativescript installed and uninstalled as well.

package.json

{
  "name": "web-mobile-project",
  "version": "0.1.0",
  "private": true,
  "scripts": {
    "serve": "vue-cli-service serve",
    "build": "vue-cli-service build",
    "lint": "vue-cli-service lint"
  },
  "dependencies": {
    "core-js": "^3.4.3",
    "vue": "^2.6.10"
  },
  "devDependencies": {
    "@vue/cli-plugin-babel": "3.5.0",
    "@vue/cli-plugin-eslint": "3.5.0",
    "@vue/cli-service": "3.5.0",
    "babel-eslint": "^10.0.3",
    "eslint": "^5.16.0",
    "eslint-plugin-vue": "^5.0.0",
    "vue-cli-plugin-nativescript-vue": "0.0.12",
    "vue-template-compiler": "^2.6.10"
  },
  "eslintConfig": {
    "root": true,
    "env": {
      "node": true
    },
    "extends": [
      "plugin:vue/essential",
      "eslint:recommended"
    ],
    "rules": {},
    "parserOptions": {
      "parser": "babel-eslint"
    }
  },
  "browserslist": [
    "> 1%",
    "last 2 versions"
  ]
}

This is the current error

Invoking generator for vue-cli-plugin-nativescript-vue...
ERROR TypeError: Cannot read property '1' of null
TypeError: Cannot read property '1' of null
at module.exports.extractCallDir (C:\Users\MyUser\WebstormProjects\web-mobile-project\node_modules\vue-cli-plugin-nativescript-vue\generator\index.js:899:78)
at module.exports.renderDirectoryStructure (C:\Users\MyUser\WebstormProjects\web-mobile-project\node_modules\vue-cli-plugin-nativescript-vue\generator\index.js:839:27)
at C:\Users\MyUser\WebstormProjects\web-mobile-project\node_modules\vue-cli-plugin-nativescript-vue\generator\index.js:191:11
at Generator.resolveFiles (C:\Users\MyUser\AppData\Local\Yarn\Data\global\node_modules@vue\cli\lib\Generator.js:209:13)
at processTicksAndRejections (internal/process/task_queues.js:85:5)
at async Generator.generate (C:\Users\MyUser\AppData\Local\Yarn\Data\global\node_modules@vue\cli\lib\Generator.js:116:5)
at async runGenerator (C:\Users\MyUser\AppData\Local\Yarn\Data\global\node_modules@vue\cli\lib\invoke.js:133:3)
at async invoke (C:\Users\MyUser\AppData\Local\Yarn\Data\global\node_modules@vue\cli\lib\invoke.js:117:3)

@pratik-soni-einfochips
Copy link

@mklueh Please install vue 3.0..
By looking at the package.json i saw you have vue 2.6.
.

@gerciljunio
Copy link

I manually installed @vue/cli-service and it is working now

npm install --save-dev @vue/cli-service

@ramsesmoreno this worked for me, I'm using vue-cli 4.1.2, thanks!

@visionfortech
Copy link

http://www.visionfortech.com/2020/02/solution-invoking-generator-for-vue-cli-nativescript-cannot-find-module-main.ts.html

Above article helped me to get that error resolved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

9 participants