bildpunkt / surfbird

A Microblogging client built on Electron and Vue
MIT License
331 stars 56 forks source link

'npm run build' fails on Windows 10 #49

Closed ghost closed 7 years ago

ghost commented 7 years ago

Hello, I had a problem running the application, The 'npm install' was successful but when I ran 'npm run build', I had this error. I didn't figured out what is happening, maybe this can help:

0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli   'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'run',
1 verbose cli   'pack' ]
2 info using npm@3.10.10
3 info using node@v6.10.3
4 verbose run-script [ 'prepack', 'pack', 'postpack' ]
5 info lifecycle surfbird@0.0.1~prepack: surfbird@0.0.1
6 silly lifecycle surfbird@0.0.1~prepack: no script for prepack, continuing
7 info lifecycle surfbird@0.0.1~pack: surfbird@0.0.1
8 verbose lifecycle surfbird@0.0.1~pack: unsafe-perm in lifecycle true
9 verbose lifecycle surfbird@0.0.1~pack: PATH: C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin;C:\...\surfbird\node_modules\.bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Git\cmd;C:\Program Files\nodejs\;C:\...\AppData\Local\Microsoft\WindowsApps;;C:\Program Files (x86)\Microsoft VS Code\bin;C:\...\AppData\Roaming\npm
10 verbose lifecycle surfbird@0.0.1~pack: CWD: C:\...\surfbird
11 silly lifecycle surfbird@0.0.1~pack: Args: [ '/d /s /c', 'npm run pack:main && npm run pack:renderer' ]
12 silly lifecycle surfbird@0.0.1~pack: Returned: code: 1  signal: null
13 info lifecycle surfbird@0.0.1~pack: Failed to exec pack script
14 verbose stack Error: surfbird@0.0.1 pack: `npm run pack:main && npm run pack:renderer`
14 verbose stack Exit status 1
14 verbose stack     at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\lib\utils\lifecycle.js:255:16)
14 verbose stack     at emitTwo (events.js:106:13)
14 verbose stack     at EventEmitter.emit (events.js:191:7)
14 verbose stack     at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\lib\utils\spawn.js:40:14)
14 verbose stack     at emitTwo (events.js:106:13)
14 verbose stack     at ChildProcess.emit (events.js:191:7)
14 verbose stack     at maybeClose (internal/child_process.js:886:16)
14 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
15 verbose pkgid surfbird@0.0.1
16 verbose cwd C:\...\surfbird
17 error Windows_NT 10.0.15063
18 error argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "pack"
19 error node v6.10.3
20 error npm  v3.10.10
21 error code ELIFECYCLE
22 error surfbird@0.0.1 pack: `npm run pack:main && npm run pack:renderer`
22 error Exit status 1
23 error Failed at the surfbird@0.0.1 pack script 'npm run pack:main && npm run pack:renderer'.
23 error Make sure you have the latest version of node.js and npm installed.
23 error If you do, this is most likely a problem with the surfbird package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error     npm run pack:main && npm run pack:renderer
23 error You can get information on how to open an issue for this project with:
23 error     npm bugs surfbird
23 error Or if that isn't available, you can get their info via:
23 error     npm owner ls surfbird
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]

regards,

pixeldesu commented 7 years ago

Okay, building on Windows 10 works fine for me. The only thing I imagine that is causing that issue is a missing file.

You need to have app/resources/credentials.json (just copy credentials.example.json and rename it), otherwise I suspect this won't build.

ghost commented 7 years ago

@pixeldesu, thanks for explanation! You should add it to the docs. So people won't fall in this again.

pixeldesu commented 7 years ago

I'll do that once I have time!

I didn't bother adding proper build docs so far as this is still in heavy development, but as Surfbird seems to get a lot of traffic now, it might be the right time to do so!