Butter fails to load with JS errors
pjfsilva opened this issue · comments
pjfsilva commented
Description
When I start with 'gulp run' the butter app screen just shows an empty black screen. Pressing F12 shows JS errors present, causing it to fail to load.
Steps to Reproduce
- Clone 5fa4171
- npm install -g gulp-cli
- npm install
- gulp build
- gulp run
6 - Butter doesn't start up and I see JS errors on console. Gulp build and run don't show any errors during build.
Expected behavior:
Butter to start up
Actual behavior:
Js errors and blank screen after a quick loading bar.
module.js:498 Uncaught Error: Cannot find module 'xmlbuilder'
at Function.Module._resolveFilename (module.js:496:15)
at Function.Module._load (module.js:439:25)
at Module.require (module.js:524:17)
at require (internal/module.js:20:19)
at self.require (<anonymous>:11:26)
app.js:729 Error: Cannot find module 'xmlbuilder'(…) "Error: Cannot find module 'xmlbuilder'
at Function.Module._resolveFilename (module.js:496:15)
at Function.Module._load (module.js:439:25)
at Module.require (module.js:524:17)
at require (internal/module.js:20:19)
at self.require (<anonymous>:11:26)
below I get another JS error
database.js:437 Error starting up TypeError: Class constructor Provider cannot be invoked without 'new'
at new CCC (D:\projectos\butter-desktop\node_modules\butter-provider-ccc\index.js:10:16)
at Promise_then_fulfilled (D:\projectos\butter-desktop\node_modules\q\q.js:766:44)
at Promise_done_fulfilled (D:\projectos\butter-desktop\node_modules\q\q.js:835:31)
at Fulfilled_dispatch [as dispatch] (D:\projectos\butter-desktop\node_modules\q\q.js:1229:9)
at Pending_become_eachMessage_task (D:\projectos\butter-desktop\node_modules\q\q.js:1369:30)
at RawTask.call (D:\projectos\butter-desktop\node_modules\q\node_modules\asap\asap.js:40:19)
at flush (D:\projectos\butter-desktop\node_modules\q\node_modules\asap\raw.js:50:29)
at _combinedTickCallback (internal/process/next_tick.js:67:7)
at process._tickCallback (internal/process/next_tick.js:98:9)(anonymous function) @ database.js:437
disclaimer.js:15 Show Disclaimerinitialize @ disclaimer.js:15
Technical details
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Windows\system32>npm --version
5.4.2
C:\Windows\system32>node --version
v8.6.0
C:\Windows\system32>gulp --version
[22:31:39] CLI version 1.4.0
C:\Windows\system32>bower --version
1.8.2```
Jean van Kasteel commented
That's an issue with NPM, it didn't install xmlbuilder for some reason. Try:
cd "D:\projectos\butter-desktop"
rd /s /q "node_modules"
npm cache clean
npm install
pjfsilva commented
Upgrading to npm 5.5.1 and starting the whole project over seems to have fixed this. Butter provider CCC was also causing errors but disabling seems to have fixed this. thanks.