Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors when trying to compile/run source on Windows #239

Closed
patrickhlauke opened this issue Mar 28, 2022 · 7 comments
Closed

Errors when trying to compile/run source on Windows #239

patrickhlauke opened this issue Mar 28, 2022 · 7 comments
Assignees
Labels
bug Something isn't working

Comments

@patrickhlauke
Copy link
Collaborator

Maybe it's my environment, but doing npm run dist errors out:

> CCA@3.1.4 dist
> electron-builder

  • electron-builder  version=22.14.13 os=10.0.19044
  • loaded configuration  file=package.json ("build" field)
  • writing effective config  file=dist\builder-effective-config.yaml
  • packaging       platform=win32 arch=x64 electron=17.1.2 appOutDir=dist\win-unpacked
  • building        target=MSI arch=x64 file=dist\CCA-Setup-3.1.4.msi
  • building        target=nsis file=dist\CCA-Setup-3.1.4.exe archs=x64 oneClick=false perMachine=true
  • building        target=portable file=dist\CCA-Portable-3.1.4.exe archs=x64
  • MSI DOESN'T SUPPORT assisted installer. Please use NSIS instead.
  • building block map  blockMapFile=dist\CCA-Setup-3.1.4.exe.blockmap
  ⨯ Exit code: 14. Command failed: C:\Users\redux\AppData\Local\electron-builder\Cache\wix\wix-4.0.0.5512.2\candle.exe -arch x64 -dappDir=D:\github\patrickhlauke\CCAe\dist\win-unpacked -pedantic -wx project.wxs WixUI_Assisted.wxs
D:\github\patrickhlauke\CCAe\dist\__msi-x64\project.wxs(23) : error CNDL0010 : The Icon/@Id attribute was not found; it is required.
D:\github\patrickhlauke\CCAe\dist\__msi-x64\project.wxs(67) : error CNDL0014 : The Shortcut/@Icon attribute's value, 'ColourContrastAnalyser(CCA)Icon.exe', is not a legal identifier. Identifiers may contain ASCII characters A-Z, a-z, digits, underscores (_), or periods (.). Every identifier must begin with either a letter or an underscore.
D:\github\patrickhlauke\CCAe\dist\__msi-x64\project.wxs(68) : error CNDL0014 : The Shortcut/@Icon attribute's value, 'ColourContrastAnalyser(CCA)Icon.exe', is not a legal identifier. Identifiers may contain ASCII characters A-Z, a-z, digits, underscores (_), or periods (.). Every identifier must begin with either a letter or an underscore.

WiX Toolset Compiler version 4.0.0.5512
Copyright (c) .NET Foundation and contributors. All rights reserved.

D:\github\patrickhlauke\CCAe\dist\__msi-x64\project.wxs
D:\github\patrickhlauke\CCAe\dist\__msi-x64\WixUI_Assisted.wxs

D:\github\patrickhlauke\CCAe\dist\__msi-x64\project.wxs(23) : error CNDL0010 : The Icon/@Id attribute was not found; it is required.
D:\github\patrickhlauke\CCAe\dist\__msi-x64\project.wxs(67) : error CNDL0014 : The Shortcut/@Icon attribute's value, 'ColourContrastAnalyser(CCA)Icon.exe', is not a legal identifier. Identifiers may contain ASCII characters A-Z, a-z, digits, underscores (_), or periods (.). Every identifier must begin with either a letter or an underscore.
D:\github\patrickhlauke\CCAe\dist\__msi-x64\project.wxs(68) : error CNDL0014 : The Shortcut/@Icon attribute's value, 'ColourContrastAnalyser(CCA)Icon.exe', is not a legal identifier. Identifiers may contain ASCII characters A-Z, a-z, digits, underscores (_), or periods (.). Every identifier must begin with either a letter or an underscore.
  failedTask=build stackTrace=Error: Exit code: 14. Command failed: C:\Users\redux\AppData\Local\electron-builder\Cache\wix\wix-4.0.0.5512.2\candle.exe -arch x64 -dappDir=D:\github\patrickhlauke\CCAe\dist\win-unpacked -pedantic -wx project.wxs WixUI_Assisted.wxs
D:\github\patrickhlauke\CCAe\dist\__msi-x64\project.wxs(23) : error CNDL0010 : The Icon/@Id attribute was not found; it is required.
D:\github\patrickhlauke\CCAe\dist\__msi-x64\project.wxs(67) : error CNDL0014 : The Shortcut/@Icon attribute's value, 'ColourContrastAnalyser(CCA)Icon.exe', is not a legal identifier. Identifiers may contain ASCII characters A-Z, a-z, digits, underscores (_), or periods (.). Every identifier must begin with either a letter or an underscore.
D:\github\patrickhlauke\CCAe\dist\__msi-x64\project.wxs(68) : error CNDL0014 : The Shortcut/@Icon attribute's value, 'ColourContrastAnalyser(CCA)Icon.exe', is not a legal identifier. Identifiers may contain ASCII characters A-Z, a-z, digits, underscores (_), or periods (.). Every identifier must begin with either a letter or an underscore.

WiX Toolset Compiler version 4.0.0.5512
Copyright (c) .NET Foundation and contributors. All rights reserved.

D:\github\patrickhlauke\CCAe\dist\__msi-x64\project.wxs
D:\github\patrickhlauke\CCAe\dist\__msi-x64\WixUI_Assisted.wxs

D:\github\patrickhlauke\CCAe\dist\__msi-x64\project.wxs(23) : error CNDL0010 : The Icon/@Id attribute was not found; it is required.
D:\github\patrickhlauke\CCAe\dist\__msi-x64\project.wxs(67) : error CNDL0014 : The Shortcut/@Icon attribute's value, 'ColourContrastAnalyser(CCA)Icon.exe', is not a legal identifier. Identifiers may contain ASCII characters A-Z, a-z, digits, underscores (_), or periods (.). Every identifier must begin with either a letter or an underscore.
D:\github\patrickhlauke\CCAe\dist\__msi-x64\project.wxs(68) : error CNDL0014 : The Shortcut/@Icon attribute's value, 'ColourContrastAnalyser(CCA)Icon.exe', is not a legal identifier. Identifiers may contain ASCII characters A-Z, a-z, digits, underscores (_), or periods (.). Every identifier must begin with either a letter or an underscore.

    at D:\github\patrickhlauke\CCAe\node_modules\builder-util\src\util.ts:133:18
    at ChildProcess.exithandler (node:child_process:406:5)
    at ChildProcess.emit (node:events:526:28)
    at maybeClose (node:internal/child_process:1092:16)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)

doing an npm run start also results in either no output (and no electron app opening) or an outright error message

> CCA@3.1.4 start
> cross-env NODE_ENV=dev electron .


[316:0328/125629.995:ERROR:broker_win.cc(56)] Error reading broker pipe: The pipe has been ended. (0x6D)
@ferllings
Copy link
Member

I'm going to run the build for Window in few minutes.
I haven't run it for several months, so maybe I need to upgrade electron builder.
I'll let you know

@ferllings ferllings self-assigned this Mar 28, 2022
@ferllings ferllings added the bug Something isn't working label Mar 28, 2022
@ferllings
Copy link
Member

ferllings commented Mar 28, 2022

I can reproduce

Related: electron-userland/electron-builder#6488

@patrickhlauke
Copy link
Collaborator Author

npm run build now works, but npm run start still does nothing - neither does clicking the portable executable.

@ferllings
Copy link
Member

I had to click twice on the executable. Odd

@patrickhlauke
Copy link
Collaborator Author

i tried variations, all leading to nothing. also tried proper installer, but after install same problem. sigh, electron...

@patrickhlauke
Copy link
Collaborator Author

npm run start still seems to throw errors... but at least npm run build works properly now

PS D:\github\patrickhlauke\CCAe> npm run start

> CCA@3.2.0 start
> cross-env NODE_ENV=dev electron .

node:events:504
      throw er; // Unhandled 'error' event
      ^

Error: spawn D:\github\patrickhlauke\CCAe\node_modules\electron\dist\electron ENOENT
    at Process.ChildProcess._handle.onexit (node:internal/child_process:283:19)
    at onErrorNT (node:internal/child_process:478:16)
    at processTicksAndRejections (node:internal/process/task_queues:83:21)
Emitted 'error' event on ChildProcess instance at:
    at Process.ChildProcess._handle.onexit (node:internal/child_process:289:12)
    at onErrorNT (node:internal/child_process:478:16)
    at processTicksAndRejections (node:internal/process/task_queues:83:21) {
  errno: -4058,
  code: 'ENOENT',
  syscall: 'spawn D:\\github\\patrickhlauke\\CCAe\\node_modules\\electron\\dist\\electron',
  path: 'D:\\github\\patrickhlauke\\CCAe\\node_modules\\electron\\dist\\electron',
  spawnargs: [ '.' ]
}

@patrickhlauke
Copy link
Collaborator Author

actually, ignore the above. fell down the trap of doing a more recent npm install in my linux subsystem for windows terminal, and then switching to powershell and doing npm run start ... forgetting that the two are completely separate worlds. doing a fresh npm install from the powershell/windows side first solved this for me. as you were... :shipit:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants