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

It works with Vue Cli 4.0? #31

Open
acacha opened this issue Oct 22, 2019 · 8 comments
Open

It works with Vue Cli 4.0? #31

acacha opened this issue Oct 22, 2019 · 8 comments

Comments

@acacha
Copy link

acacha commented Oct 22, 2019

Same error than here: #2

ERROR Error: Cannot find module '@vue/cli-service/generator/template/src/router.js' from

But using vue cli 4.0.

@JenteVH
Copy link

JenteVH commented Oct 22, 2019

It looks like currently it isn't. Understandable considering vue cli 4 was released 5 days ago.

@acacha
Copy link
Author

acacha commented Oct 23, 2019

Ok. For reference https://cli.vuejs.org/migrating-from-v3/

@acacha
Copy link
Author

acacha commented Oct 23, 2019

@acacha
Copy link
Author

acacha commented Oct 23, 2019

The default directory structure was changed:
src/store.js moved to src/store/index.js;
src/router.js renamed to src/router/index.js;

@yabuking84
Copy link

yabuking84 commented Nov 3, 2019

Have the same error also.
Error: Cannot find module '@vue/cli-service/generator/router/template/src/router.js'

How can we fix this?

@luiguild
Copy link

luiguild commented Nov 4, 2019

This error it's also exist in Vue Cli 3

image

@paperscissors
Copy link

Yeah, I got here because I was getting this error with Vue CLI 3.4.1. I heard talk of Vue CLI 4 fixing it, but here we are, I'm getting the same error on 4.*.

Package version 0.2.1.

@jonkri
Copy link

jonkri commented May 16, 2020

I can't add the plugin to Vue CLI projects either.

I have tried using both version 3 and (several variants of) version 4.

Version 3.12.1:

$ npx @vue/cli@3 create test
$ npx @vue/cli@3 add vue-cli-plugin-nativescript-vue
✔  Successfully installed plugin: vue-cli-plugin-nativescript-vue

? 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
adding to package.json
deleting from package.json
doing template rendering

🚀  Invoking generator for vue-cli-plugin-nativescript-vue...
 ERROR  Error: Cannot find module '@vue/cli-service/generator/router.js' from '/home/jonkri/test/node_modules/vue-cli-plugin-nativescript-vue/generator/templates/simple/src'
Error: Cannot find module '@vue/cli-service/generator/router.js' from '/home/jonkri/test/node_modules/vue-cli-plugin-nativescript-vue/generator/templates/simple/src'
    at Function.resolveSync [as sync] (/home/jonkri/.npm/_npx/27842/lib/node_modules/@vue/cli/node_modules/resolve/lib/sync.js:89:15)
    at renderFile (/home/jonkri/.npm/_npx/27842/lib/node_modules/@vue/cli/lib/GeneratorAPI.js:422:17)
    at /home/jonkri/.npm/_npx/27842/lib/node_modules/@vue/cli/lib/GeneratorAPI.js:254:27
    at Generator.resolveFiles (/home/jonkri/.npm/_npx/27842/lib/node_modules/@vue/cli/lib/Generator.js:209:13)
    at processTicksAndRejections (internal/process/task_queues.js:88:5)
    at async Generator.generate (/home/jonkri/.npm/_npx/27842/lib/node_modules/@vue/cli/lib/Generator.js:116:5)
    at async runGenerator (/home/jonkri/.npm/_npx/27842/lib/node_modules/@vue/cli/lib/invoke.js:133:3)
    at async invoke (/home/jonkri/.npm/_npx/27842/lib/node_modules/@vue/cli/lib/invoke.js:117:3)

The same error occurs on the latest version (4.3.1), 4.2 (4.2.3), 4.1 (4.1.2) and 4.0 (4.0.5).

Using version 4 produces a number of ESLint errors as well:

error: Unnecessary escape character: \/ (no-useless-escape) at webpack.config.js:214:25:
  212 |             },
  213 |             {
> 214 |                 test: /[\/|\\]app\.css$/,
      |                         ^
  215 |                 use: [
  216 |                     'nativescript-dev-webpack/style-hot-loader',
  217 |                     {


error: Unnecessary escape character: \/ (no-useless-escape) at webpack.config.js:224:25:
  222 |             },
  223 |             {
> 224 |                 test: /[\/|\\]app\.scss$/,
      |                         ^
  225 |                 use: [
  226 |                     'nativescript-dev-webpack/style-hot-loader',
  227 |                     {


error: Unnecessary escape character: \/ (no-useless-escape) at webpack.config.js:236:28:
  234 |             {
  235 |                 test: /\.css$/,
> 236 |                 exclude: /[\/|\\]app\.css$/,
      |                            ^
  237 |                 use: [
  238 |                     'nativescript-dev-webpack/style-hot-loader',
  239 |                     'nativescript-dev-webpack/apply-css-loader.js',


error: Unnecessary escape character: \/ (no-useless-escape) at webpack.config.js:245:28:
  243 |             {
  244 |                 test: /\.scss$/,
> 245 |                 exclude: /[\/|\\]app\.scss$/,
      |                            ^
  246 |                 use: [
  247 |                     'nativescript-dev-webpack/style-hot-loader',
  248 |                     'nativescript-dev-webpack/apply-css-loader.js',


5 errors found.

The default options were chosen when queried by the create and add commands.

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

6 participants