This is my first time using Tauri, so, I’m making a ReactJS application using Vite, and I wanted to have Tauri too.
I’ve installed the prerequisites as the docs suggested:
- C++ Build Tools for Visual Studio 2022.
- Rust lang.
- NodeJS.
- Microsoft Edge Web View.
Then I made a Tauri app using NPM, however, everytime I run:
npm run tauri dev
I get the following error:
error: linking with `link.exe` failed: exit code: 1181
# ...
# Long error message, I've attached the whole message in a screenshot
# ...
= note: LINK : fatal error LNK1181: cannot open input file 'D:Hashem'sDevelopmentReactJSInitial-Taurisrc-tauritargetdebugbuildinitial-tauri-18f3a34e9ab864b9outresource.lib'
I made a new project just for this problem, and I followed these exact steps:
- Created a Tauri application using the command:
npm create tauri-app
- Chose TypeScript/JavaScript as the Front-End language.
- Chose NPM as my package manager.
- Chose ReactJS as my UI template.
- Hit the command to install all modules:
npm i
Everything so far has gone great and no problems, and I’m able to run the ReactJS’ part normally with no issues using the command:
npm run dev
However, when I run Tauri using the command:
npm run tauri dev
The ReactJS’ part still runs, but Tauri’s doesn’t, and all I get is this following monstrosity of an error:
A screenshot of the error
error: linking with `link.exe` failed: exit code: 1181
# ...
# Long error message, I've attached the whole message in a screenshot
# ...
= note: LINK : fatal error LNK1181: cannot open input file 'D:Hashem'sDevelopmentReactJSInitial-Taurisrc-tauritargetdebugbuildinitial-tauri-18f3a34e9ab864b9outresource.lib'
For anyone wanting to check the code of the project, you can find it here:
[https://gitlab.usol.ca/hashem-wannous/initial-tauri/]
I’d like to add: I’ve never written any code manually, everything I did was running the NPM commands mentioned above, but I thought seeing the configuration might be helpful in some way.