wails icon indicating copy to clipboard operation
wails copied to clipboard

Use unix paths only in `wails.json`

Open leaanthony opened this issue 3 years ago • 1 comments

When running a project on unix after windows, the paths in wails.json will be invalid. If we standardise on unix paths then this will make projects portable.

Discussed in https://github.com/wailsapp/wails/discussions/1445

Originally posted by tataDan June 12, 2022 On my Linux computer I created the "myproject" project based on the instructions found at Creating a project by issuing the command wails init -n myproject -t svelte. The application successfully ran after executing wails dev.

I copied the project folder to my Windows 10 computer. When I executed wails dev the following output was generated:

Wails CLI v2.0.0-beta.37

Executing: go mod tidy -compat=1.17
Executing: wails generate module
Building application for development...
  - Installing frontend dependencies: Done.
  - Compiling frontend:     
    > [email protected] build
    > vite build

    'vite' is not recognized as an internal or external command,
    operable program or batch file.

Build error - continuing to run current version
exit status 1
Running frontend dev watcher command: 'npm run dev'
Watching (sub)/directory: C:\Users\daniel\goPrograms\wails_v2\myproject-linux
Using DevServer URL: http://localhost:34115
Using Frontend DevServer URL: http://localhost:3000
Using reload debounce setting of 100 milliseconds

> [email protected] dev
> vite

'vite' is not recognized as an internal or external command,
operable program or batch file.
Dev command exited!

I then tried wails dev -f which failed and generated the following output:

Wails CLI v2.0.0-beta.37

Executing: go mod tidy -compat=1.17 Executing: wails generate module Building application for development...

  • Installing frontend dependencies: Done.

  • Compiling frontend:

    [email protected] build vite build

    vite v2.9.10 building for production... transforming... ✓ 9 modules transformed.

    npm WARN config global --global, --local are deprecated. Use --location=global instead. EPERM: operation not permitted, unlink 'C:\Users\daniel\goPrograms\wails_v2\myproject\frontend\dist\assets\logo-universal.cb3119ea.png' error during build: Error: EPERM: operation not permitted, unlink 'C:\Users\daniel\goPrograms\wails_v2\myproject\frontend\dist\assets\logo-universal.cb3119ea.png' at Object.unlinkSync (node:fs:1771:3) at emptyDir (C:\Users\daniel\goPrograms\wails_v2\myproject\frontend\node_modules\vite\dist\node\chunks\dep-9e5491c9.js:18612:25)
    at emptyDir (C:\Users\daniel\goPrograms\wails_v2\myproject\frontend\node_modules\vite\dist\node\chunks\dep-9e5491c9.js:18608:13)
    at prepareOutDir (C:\Users\daniel\goPrograms\wails_v2\myproject\frontend\node_modules\vite\dist\node\chunks\dep-9e5491c9.js:41718:13) at doBuild (C:\Users\daniel\goPrograms\wails_v2\myproject\frontend\node_modules\vite\dist\node\chunks\dep-9e5491c9.js:41691:13)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async build (C:\Users\daniel\goPrograms\wails_v2\myproject\frontend\node_modules\vite\dist\node\chunks\dep-9e5491c9.js:41527:16) at async CAC. (C:\Users\daniel\goPrograms\wails_v2\myproject\frontend\node_modules\vite\dist\node\cli.js:738:9)

Build error - continuing to run current version exit status 1 Running frontend dev watcher command: 'npm run dev' Watching (sub)/directory: C:\Users\daniel\goPrograms\wails_v2\myproject Using DevServer URL: http://localhost:34115 Using Frontend DevServer URL: http://localhost:3000 Using reload debounce setting of 100 milliseconds npm WARN config global --global, --local are deprecated. Use --location=global instead.

[email protected] dev vite

vite v2.9.10 dev server running at:

Local: http://localhost:3000/ Network: use --host to expose

ready in 1080ms.

What is the recommended method to run a project transferred from another operating system?
</div>

leaanthony avatar Jun 12 '22 00:06 leaanthony

Delaying this as I'm not 💯 sure that the paths are the issue.

leaanthony avatar Jun 25 '22 12:06 leaanthony

Closing this as I can't reproduce.

leaanthony avatar Nov 25 '22 03:11 leaanthony