vue-cli-plugin-nativescript-vue
vue-cli-plugin-nativescript-vue copied to clipboard
It works with Vue Cli 4.0?
Same error than here: https://github.com/nativescript-vue/vue-cli-plugin-nativescript-vue/issues/2
ERROR Error: Cannot find module '@vue/cli-service/generator/template/src/router.js' from
But using vue cli 4.0.
It looks like currently it isn't. Understandable considering vue cli 4 was released 5 days ago.
Ok. For reference https://cli.vuejs.org/migrating-from-v3/
https://cli.vuejs.org/migrating-from-v3/#the-global-vue-cli
The default directory structure was changed:
src/store.js moved to src/store/index.js;
src/router.js renamed to src/router/index.js;
Have the same error also. Error: Cannot find module '@vue/cli-service/generator/router/template/src/router.js'
How can we fix this?
This error it's also exist in Vue Cli 3
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.
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.