Open mdartic opened 4 years ago
Hi I have found another solution to start project now.
Thanks @SergeyKons for your help. I found help in nativescript slack "vue" channel. By using the CLI v3, it's ok !
But, maybe we can make this plugin work with the CLI v4 ?
I think the Cannot read property '__expression' of undefined
is a problem, but for the moment, I don't know how to fix it.
@jawa-the-hutt any ideas ?
I have facing same issue since last 5 day. 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
Linux/Ubuntu: /usr/local
Then Follow below steps 1) npm install -g @vue/cli@3.10.0 2) Go to code sharing project Directory's root folder location where you have package.json 3)npm install --save-dev @vue/cli-service@3.5.0 4)npm install --save-dev vue-cli-plugin-nativescript-vue@0.0.12 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...
sounds related to #25 ?
Yes we do have same kind of issues open which is #25
Cant install with vue 3.10
vue --version 3.10.0
invoking generator for vue-cli-plugin-nativescript-vue... ERROR Error: Cannot find module '@vue/cli-service/generator/router/template/src/router.js' from '/Users/user/Projects/my-app/node_modules/vue-cli-plugin-nativescript-vue/generator/templates/simple/src'
I think this issue isn´t that appealing to new people including myself that are following the tutorials on their website, however maybe @jawa-the-hutt can look into that when he has some time
@mklueh what website?
@acamenhas Use any minor version of vue 3.
@acamenhas Use any minor version of vue 3.
Thank you @pratik-soni-einfochips it worked!!!
I've merged PR #35 as well as done some other updates this morning. Update the plugin to 0.3.1 and see if this helps resolve the CLI 4.0 compatibility.
I'm not 100% for sure on this one as my global CLI install is 3.12.1, but in a test project, the local CLI version is 4.1.0. Because of this I'm not 100% for sure if CLI 4 will work or if it does, if this breaks CLI 3 behavior.
Since CLI 4 is the way forward for Vue, I've no real interest in trying to maintain backwards compatibility with CLI 3 as one of the major changes for CLI 4 was moving to webpack-chain
v6.0 which breaks things with CLI 3 from what I can tell.
And FYI, 0.3.1 of this plugin should deploy a NS 6.3 compatible app. This also means you'll be on NS-Vue 2.5.0-alpha.3
I have facing same issue since last 5 day. 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\AppData\Roaming.
Linux/Ubuntu: /usr/local
Then Follow below steps 1) npm install -g @vue/cli@3.10.0 2) Go to code sharing project Directory's root folder location where you have package.json 3)npm install --save-dev @vue/cli-service@3.5.0 4)npm install --save-dev vue-cli-plugin-nativescript-vue@0.0.12 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...
@pratik-soni-einfochips http://www.visionfortech.com/2020/02/solution-invoking-generator-for-vue-cli-nativescript-cannot-find-module-main.ts.html
Hello,
I'm trying this plugin, and, first of all, thanks for the work to make this available. Nevertheless, I encounter some bugs / problems during installation... with @vue/cli v4 .
Maybe related to https://github.com/nativescript-vue/vue-cli-plugin-nativescript-vue/issues/2#issuecomment-549501158
When I create a new project with
vue create my-dir
, choosing some options withvue-router
, thenvue add nativescript-vue
with options :I encounter this error :
I think it's related to the fact that in the CLI v4, the
vue-router
has a dedicated plugin.I try to update the nativescript-vue CLI plugin in a fork with a commit updating some paths. With this version, seems ok.
I add another commit for the vuex store. (but not tested 'cause I don't use vuex) I'm not sure the
moveSync
andcopy
will work in a missing directory. (thegenConfig.dirPathPrefix + genConfig.nativeAppPathModifier + 'store'
dir doesn't exist yet ?)I run
yarn serve:web
, and discover another error withsass-loader
module missing. I didn't say I was using sass (?!), but by adding this module as a dev dependency, webpack is happier.So with a
yarn add --dev sass-loader
,yarn serve:web
is ok and running onhttp://localhost:8080
.Now I go through Firefox on this URL, I encounter another error in Console Devtools :
When I go to the
src/main.js
, I can't see anymore the import of router. I fix it directly in my code by importing the router and adding it to thenew Vue({})
instruction. I don't know exactly how to fix this in themain.js
(andmain.native.js
?) of the plugin.After that, routing is ok for my web browser.
Then I try
yarn serve:android
with an android device connected in debug, and after installing awebpack-cli
(by the plugin), it doesn't work, and I'm stucked with this error :Do you have an idea ?
Are you interested by a PR with my code for the router/store issues ?
Can't we use the
vue.config.js
to make this android / ios jobs ? and avoid installing a webpack ? Just reuse the webpack already installed ?Thanks for your reply