Skip to content

It works with Vue Cli 4.0? #31

Open
@acacha

Description

@acacha

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.

Activity

JenteVH

JenteVH commented on Oct 22, 2019

@JenteVH

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

acacha

acacha commented on Oct 23, 2019

@acacha
Author
acacha

acacha commented on Oct 23, 2019

@acacha
Author
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

yabuking84 commented on Nov 3, 2019

@yabuking84

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

How can we fix this?

luiguild

luiguild commented on Nov 4, 2019

@luiguild

This error it's also exist in Vue Cli 3

image

paperscissors

paperscissors commented on Nov 7, 2019

@paperscissors

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

jonkri commented on May 16, 2020

@jonkri

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @paperscissors@jonkri@acacha@luiguild@JenteVH

        Issue actions

          It works with Vue Cli 4.0? · Issue #31 · nativescript-vue/vue-cli-plugin-nativescript-vue