Closed Flavsditz closed 2 years ago
Had exactly the same error using the github action proposed on the website so I can rule out that my machine is incorrectly configured and assume it is something I have on the project. I've fixed another issue which was present in the pipeline but got the exact same mistake (check https://github.com/tauri-apps/tauri-action/issues/288 for more info)
Running npm run tauri:build -- --verbose
will output more information.
Btw your CLI is super outdated, you should update to v1.0.2.
ahh actually there's a bug in the vue plugin that prevents you from updating :(
Yeah I've tried to update everything I can but I cannot for the life of me get the CLI updated. I am happy to hear that I wasn't just going crazy and it could be a bug.
But does the CLI can update itself? Because the project is up-to-date and I couldn't find it also installed as a global dependency.
I cannot find out where that Node.js environment
information is coming from
Node.js information comes from the tauri info
command, provided by @tauri-apps/cli
. We need to update the vue-cli-plugin-tauri first so the CLI can be updated, we're preparing a release for it.
You could also remove the plugin and use the CLI directly, though you'd need to fill devPath
and distDir
in tauri.conf.json.
ok but this dependency to the @tauri-apps/cli
is not taken from the package.json
?
I mean if I look at my package.json
that dependency is up-to-date:
...
"dependencies": {
"@tauri-apps/api": "^1.0.1",
"@tauri-apps/cli": "^1.0.2",
"axios": "^0.27.2",
"core-js": "^3.23.3",
"exceljs": "^4.3.0",
"jsonwebtoken": "^8.5.1",
"vue": "^2.6.14",
"vue-class-component": "^7.2.6",
"vue-property-decorator": "^9.1.2",
"vue-router": "^3.5.4",
"vuex": "^3.6.2"
},
"devDependencies": {
"@tailwindcss/postcss7-compat": "^2.2.17",
"@types/exceljs": "^1.3.0",
"@typescript-eslint/eslint-plugin": "^4.33.0",
"@typescript-eslint/parser": "^4.33.0",
"@vue/cli-plugin-babel": "~4.5.19",
"@vue/cli-plugin-eslint": "~4.5.19",
"@vue/cli-plugin-router": "~4.5.19",
"@vue/cli-plugin-typescript": "~4.5.19",
"@vue/cli-plugin-vuex": "~4.5.19",
"@vue/cli-service": "~4.5.19",
"@vue/eslint-config-prettier": "^6.0.0",
"@vue/eslint-config-typescript": "^7.0.0",
"autoprefixer": "^9",
"eslint": "^6.8.0",
"eslint-plugin-prettier": "^3.4.1",
"eslint-plugin-vue": "^6.2.2",
"lint-staged": "^13.0.3",
"postcss": "^7",
"prettier": "^2.7.1",
"prettier-plugin-tailwindcss": "^0.1.11",
"tailwindcss": "npm:@tailwindcss/postcss7-compat@^2.2.17",
"typescript": "~4.4.4",
"vue-cli-plugin-tailwind": "~3.0.0",
"vue-cli-plugin-tauri": "~1.0.0-rc.3",
"vue-template-compiler": "^2.7.0"
},
...
But I still have it showing as that release candidate with tauri info
(1.0.0-rc.4)
Yeah because vue-cli-plugin-tauri
also has a dependency on @tauri-apps/cli
, and we didn't update it to 1.0.0 yet.
ahhh I see! Thank you so much for all the patience and explanations @lucasfernog
I was doing some experimentation and I've tried to commit my node_modules
folder (also the benefit of speeding up the pipeline) with the up-to-date contents of the vue-cli-plugin-tauri
from the repo, where the dependencies are updated at least.
The build failed with:
Run tauri-apps/tauri-action@dev
running npm [ 'run', 'tauri:build' ]
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
ERROR Error: Cannot find module '@tauri-apps/cli-win32-x64-msvc'
Require stack:
- D:\a\fusionauth-admin\fusionauth-admin\node_modules\@tauri-apps\cli\index.js
- D:\a\fusionauth-admin\fusionauth-admin\node_modules\@tauri-apps\cli\main.js
- D:\a\fusionauth-admin\fusionauth-admin\node_modules\vue-cli-plugin-tauri\index.js
- D:\a\fusionauth-admin\fusionauth-admin\node_modules\@vue\cli-service\lib\Service.js
- D:\a\fusionauth-admin\fusionauth-admin\node_modules\@vue\cli-service\bin\vue-cli-service.js
Error: Cannot find module '@tauri-apps/cli-win32-x64-msvc'
Require stack:
- D:\a\fusionauth-admin\fusionauth-admin\node_modules\@tauri-apps\cli\index.js
- D:\a\fusionauth-admin\fusionauth-admin\node_modules\@tauri-apps\cli\main.js
- D:\a\fusionauth-admin\fusionauth-admin\node_modules\vue-cli-plugin-tauri\index.js
- D:\a\fusionauth-admin\fusionauth-admin\node_modules\@vue\cli-service\lib\Service.js
- D:\a\fusionauth-admin\fusionauth-admin\node_modules\@vue\cli-service\bin\vue-cli-service.js
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
at Function.Module._load (node:internal/modules/cjs/loader:778:27)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.<anonymous> (D:\a\test-tauri-app\test-tauri-app\node_modules\@tauri-apps\cli\index.js:65:29)
at Module._compile (node:internal/modules/cjs/loader:1105:[14](https://github.com/Flavsditz/test-tauri-app/runs/7209730433?check_suite_focus=true#step:7:15))
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1[15](https://github.com/Flavsditz/test-tauri-app/runs/7209730433?check_suite_focus=true#step:7:16)9:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:1005:[19](https://github.com/Flavsditz/test-tauri-app/runs/7209730433?check_suite_focus=true#step:7:20))
@Flavsditz it's a little bit harder to use a local CLI, you'd need to build it. I've updated the plugin, can you update vue-cli-plugin-tauri
to 1.0.0
and try again?
Closing due to inactivity. Please reopen if it still does not work.
Describe the bug
I have successfully developed and bundled my app for Linux. In the past I have also done a windows bundle, but now when I run
tauri:build
(runs thevue-cli-service tauri:build
) the Vue part bundles correctly and the subsequent part fails.Reproduction
No response
Expected behavior
I expect a .exe to be outputed
Platform and versions
Stack trace
Additional context
When I run
cargo tauri info
it shows that the tauri-cli is outdated in the Node.js environment, but I cannot seem to be able to update that one (maybe this is the issue?). All the tauri dependencies in my project are otherwise up-to-date