railsware / bozon Goto Github PK
View Code? Open in Web Editor NEW๐ Command line tool for building, testing and publishing modern Electron applications
License: MIT License
๐ Command line tool for building, testing and publishing modern Electron applications
License: MIT License
Needs to be updated for Electron v3.0.2
Has some deprecations
npm WARN deprecated [email protected]: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5
npm WARN deprecated [email protected]: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated @types/[email protected]: This is a stub types definition for commander (https://github.com/tj/commander.js). commander provides its own type definitions, so you don't need @types/commander installed!
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: If using 2.x branch, please upgrade to at least 2.1.6 to avoid a serious bug with socket data flow and an import issue introduced in 2.1.0
npm WARN deprecated [email protected]: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
Is it possible to get a shortcut created on desktop on installation?
Hello,
Is it possible to debug the main process in the devtools? Webpack is adding that closure, so I can't easily debug. Also I can't get require to work for local files, how do I use that?
Thanks!
Either add syntax options
bozon new [project_name] --sass, --scss, --less
or
add options sass
, scss
, less
to inquirer
or
handle css with webpack
and avoid css compilation with gulp
How to reproduce:
bozon new PROJECT
(here under OSX)node_modules
-subdirnpm install
in the PROJECT's dirbozon start
That led to the error:
module.js:328
throw err;
^
Error: Cannot find module 'bozon/lib/tasks'
at Function.Module._resolveFilename (module.js:326:15)
at Function.Module._load (module.js:277:25)
at Module.require (module.js:354:17)
at require (internal/module.js:12:17)
at Object.<anonymous> (/DIR/PROJECT/gulpfile.js:1:63)
at Module._compile (module.js:410:26)
at Object.Module._extensions..js (module.js:417:10)
at Module.load (module.js:344:32)
at Function.Module._load (module.js:301:12)
at Module.require (module.js:354:17)
Error launching app
Unable to find Electron app at [...]
Fix:
in the file PROJECT/package.json
add to devDependencies
the following dependency:
"bozon": "^0.7.1"
and subsequently npm install
I found that as a solution since the module bozon/lib/tasks
was in case of OSX found as PROJECT/node_modules/bozon/lib/tasks.js
but missing in case of linux.
So "bozon" seems actually to be a missing devDependency.
HTH and kind regards,
Thomas
out of the box fresh launch tried to adjust sizing in settings.json
{
"width": 900,
"height": 650
}
Still launching with a default looks like 500x500 window.
Only way I can get window to size is to hard code values into the main/index.js by overwriting the json.settings.width/height values.
Not really an issue but why not use "Boson" so that it falls in line with "Photon" and "Electron"? I understand that Bozon sounds similar unless the creators are from the village Bozon in Turkey.
While trying to follow the install steps i do this:
$ ls ./node_modules/.bin/
bozon* bozon.cmd electron* electron.cmd
Any insight into how to complete the install is much appreciated.
Steps:
bozon new bozontest
cd bozontest/app
and npm install electron-debug
to install package to the app/node_modulesrequire('electron-debug')();
to the app/javascripts/main/index.jsbozon start
from root project folder and it throws an error:App threw an error during load Error: Cannot find module 'electron-debug'
It works for packaged app, though.
Adding that package to the root package.json instead: works for bozon start
, but does not work with packaged app.
Is it correct to add it to both root package.json and app/package.json ?
Hi,
if the project path contains any spaces the childProcess.spawn
functions are not executing the right files.
You have to enclose such paths with " .
(Sorry I have no time for a PR the next two weeks)
PS C:\Users\justi\OneDrive\Bureau\Electron> bozon new HornelleTop
Welcome to Bozon!
You're about to start new Electron application,
but first answer a few questions about your project:
? What is the name of your app? HornelleTop
? Please specify author name (ex: John Doe): Justin Dah-kenangnon
create .gitignore
create package.json
create webpack.config.js
create LICENSE
create README.md
create src\main\index.js
create src\preload\index.js
create src\renderer\index.html
create src\renderer\stylesheets\application.css
create src\renderer\javascripts\index.js
create resources\icon.icns
create resources\icon.ico
create config\settings.json
create config\environments\development.json
create config\environments\production.json
create config\environments\test.json
create config\platforms\windows.json
create config\platforms\linux.json
create config\platforms\mac.json
create test\features\main_spec.js
create test\helper.js
Running npm install..
npm WARN deprecated [email protected]: outdated version, please use @next
npm WARN deprecated [email protected]: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
[email protected] install C:\Users\justi\OneDrive\Bureau\Electron\hornelle_top\node_modules\electron-chromedriver
node ./download-chromedriver.js
[email protected] postinstall C:\Users\justi\OneDrive\Bureau\Electron\hornelle_top\node_modules\babel-runtime\node_modules\core-js
node -e "try{require('./postinstall')}catch(e){}"
Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!
The project needs your help! Please consider supporting of core-js on Open Collective or Patreon:
https://opencollective.com/core-js
https://www.patreon.com/zloirock
Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)
[email protected] postinstall C:\Users\justi\OneDrive\Bureau\Electron\hornelle_top\node_modules\core-js
node -e "try{require('./postinstall')}catch(e){}"
[email protected] postinstall C:\Users\justi\OneDrive\Bureau\Electron\hornelle_top\node_modules\dmg-builder\node_modules\ejs
node ./postinstall.js
Thank you for installing EJS: built with the Jake JavaScript build tool (https://jakejs.com/)
[email protected] postinstall C:\Users\justi\OneDrive\Bureau\Electron\hornelle_top\node_modules\ejs
node ./postinstall.js
Thank you for installing EJS: built with the Jake JavaScript build tool (https://jakejs.com/)
[email protected] postinstall C:\Users\justi\OneDrive\Bureau\Electron\hornelle_top\node_modules\electron
node install.js
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN [email protected] No repository field.
npm WARN [email protected] No license field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\watchpack\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
added 1019 packages from 973 contributors and audited 6460 packages in 603.283s
25 packages are looking for funding
run npm fund
for details
run npm audit fix
to fix them, or npm audit
for details
Success! Created hornelle_top at C:\Users\justi\OneDrive\Bureau\Electron\hornelle_top
Inside that directory, you can run several commands:
bozon start
Starts the Electron app in development mode.
bozon test
Starts the test runner.
bozon package
Packages Electron application for specified platform.
We suggest you to start with typing:
cd hornelle_top
bozon start
PS C:\Users\justi\OneDrive\Bureau\Electron> cd hornelle_top
`PS C:\Users\justi\OneDrive\Bureau\Electron\hornelle_top> npm audit fix
npm WARN [email protected] No repository field.
npm WARN [email protected] No license field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\watchpack\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
up to date in 68.324s
25 packages are looking for funding
run npm fund
for details
fixed 0 of 2 vulnerabilities in 6460 scanned packages
2 vulnerabilities required manual review and could not be updated
PS C:\Users\justi\OneDrive\Bureau\Electron\hornelle_top>
`
new Tray(NativeImage.createEmpty());
uncaughtException: Cannot read property 'createEmpty' of undefined
TypeError: Cannot read property 'createEmpty' of undefined
at registerTray (/Users/umutcelik/viadirect/viadirect-oriantation/builds/development/javascripts/main/index.js:202:55)
at App.initApp (/Users/umutcelik/viadirect/viadirect-oriantation/builds/development/javascripts/main/index.js:222:5)
at App.emit (events.js:187:15)
Without Cygwin installed the "package" task fails silently.
The problem is a "cp command not found" that produce an app.asas empty
Trying to package a portable windows app, I tought it will be enough to pass electron builder options into windwows.json but NSIS installer was produced
Any help?
{
"icon": ".ico",
"target": "portable"
}
Reference https://github.com/electron-userland/electron-builder/wiki/Options#WinBuildOptions-target
Do Native NPM Modules work with this or do I need "electron-rebuild"?
I'm on Windows 10, running Bozon 0.6.1
First of all, sorry, i'm a newbie at Javascript/NodeJS (this project itself is for learning more about it)
I've saved random-js and material-components-web to app/node_modules and I want to use them in my electron app, but the node_modules isn't being copied to the builds/development folder, so i cant use them.
Probably prepare::app can't stat them?
I've see the routine for prepare::app, and (if i'm not wrong) Bozon will try to stat node_modules and copy it to the builds/. And if it can't stat it, it will fallback to the cp -r method (wich is unavailable on Windows, of course), am I right?
And I don't know if this is a bug, or a stupid newbie question.. Thanks in advance
On bozon start
I get this:
[08:52:55] Using gulpfile ~/AnchorWP/public/anchor_wp/gulpfile.js
[08:52:55] Starting 'html'...
[08:52:55] Starting 'images'...
[08:52:55] Starting 'styles'...
[08:52:55] Starting 'scripts:main'...
[08:52:55] Starting 'scripts:renderer'...
[08:52:56] Finished 'images' after 337 ms
[08:52:56] 'html' errored after 391 ms
[08:52:56] Error: EACCES: permission denied, mkdir '/Users/matthewpritchett/AnchorWP/public/anchor_wp/builds'
at Error (native)
[08:52:56] 'styles' errored after 379 ms
[08:52:56] Error: EACCES: permission denied, mkdir '/Users/matthewpritchett/AnchorWP/public/anchor_wp/builds'
at Error (native)
[08:52:56] 'scripts:main' errored after 378 ms
[08:52:56] Error: EACCES: permission denied, mkdir '/Users/matthewpritchett/AnchorWP/public/anchor_wp/builds'
at Error (native)
[08:52:56] Version: webpack 1.14.0
Asset Size Chunks Chunk Names
application.js 1.88 kB 0 [emitted] main
[08:52:56] 'scripts:renderer' errored after 419 ms
[08:52:56] Error: EACCES: permission denied, mkdir '/Users/matthewpritchett/AnchorWP/public/anchor_wp/builds'
at Error (native)
Debugging the Main Process in the electron docs talks about adding --debug but I can't seem to figure out how to do that with bozon.
I have a dependency that requires loading a json, but to work with webpack I need to include json-loader, else throws:
... /app/node_modules/mime/types.json Unexpected token (1:27)
You may need an appropriate loader to handle this file type.
Can be reproduced installing and instantiating the node-mime module.
Adding the loader manually to bozon/lib/building/tasks.js it solves the problem:
bozon.task('scripts:renderer', function () {
var webpack = bozon.requireLocal('webpack-stream')
return bozon.src('javascripts/renderer/application.*').pipe(webpack({
target: 'electron',
output: {
filename: 'application.js'
},
module: {
loaders: [
{ test: /\.json$/, loader: "json-loader" }
]
}
})).pipe(bozon.dest('javascripts/renderer'))
})
Can this be done somehow in the bozon config files? I'm not so clear on how to do webpack config with the bozon config files setup.
Im new to using bozon and I wanted to see if anyone has this setup with visual studio code debugging. I cant seem to get it to keep the debugger running using bozon start. Any help would be great
App runs smoothly with bozon start
After i package the app, i run the .exe, an installation green box appears, my app starts with a new window, after 6 seconds app window closes and then after 2-3 seconds app re opens successfully.
Are you familiar with this behavior or is it me? I would like it to open just once.
I am on Windows 10 x64, bozon version is 0.6.1
hi there,
nice tool, just found it and was happy to use it.
but it looks like it is a outdated. i just wondering if you still support this project or if its better for me to use another build tool?
the error message happens while trying to deploy a windows app under os x:
[01:01:02] Finished 'html' after 274 ms [01:01:02] Finished 'styles' after 256 ms [01:01:02] Finished 'scripts:main' after 255 ms [01:01:02] Finished 'scripts:renderer' after 255 ms [01:01:02] Starting 'prepare:app'... [01:01:02] Finished 'prepare:app' after 35 ms Warning: "build.osx" is deprecated โ please use "mac" instead of "osx" Skip app dependencies rebuild because platform is different Warning: app-bundle-id is deprecated, please use appId Unhandled rejection Error: Cannot check wine version: Error: spawn wine ENOENT
anyway, even i couldn't use the tool yet thanks for the great work you done for the electron community.
cheers maiky
Hi! :)
I'm installer Bozon 0.3.4 via npm install bozon -g
. But when I run bozon new appname
, bozon generate a directory withou gulpfile.js
and package.json
. :/ I cannot run bozon start
, because:
โ appname bozon start
[11:08:42] No gulpfile found
I tried to run npm install
too... :/
My system:
โ appname node --version
v5.9.0
โ appname npm --version
3.7.3
โ appname sw_vers
ProductName: Mac OS X
ProductVersion: 10.11
BuildVersion: 15A284
First things first: AWESOME project ! ๐
The error...
Unhandled rejection Error: electron-prebuilt must be in the devDependencies - Click to expand
CI detected, so artifacts will be published if draft release exists
Unhandled rejection Error: electron-prebuilt must be in the devDependencies
at checkDependencies (/dev/code/bozon_test/node_modules/electron-builder/src/packager.ts:310:13)
at Packager.checkMetadata (/dev/code/bozon_test/node_modules/electron-builder/src/packager.ts:184:5)
at Packager.<anonymous> (/dev/code/bozon_test/node_modules/electron-builder/src/packager.ts:90:10)
at next (native)
at runCallback (timers.js:574:20)
at tryOnImmediate (timers.js:554:5)
at processImmediate [as _immediateCallback] (timers.js:533:5)
From previous event:
at tsAwaiter (/dev/code/bozon_test/node_modules/electron-builder/src/util/awaiter.ts:10:47)
at Object.build (/dev/code/bozon_test/node_modules/electron-builder/out/builder.js:153:12)
at Packager.productionBuild (/usr/local/lib/node_modules/bozon/lib/packaging/packager.js:46:33)
at Packager.build (/usr/local/lib/node_modules/bozon/lib/packaging/packager.js:19:19)
at Object.package (/usr/local/lib/node_modules/bozon/lib/bin/runner.js:21:42)
at Command.<anonymous> (/usr/local/lib/node_modules/bozon/lib/bin/bozon.js:42:19)
at Command.listener (/usr/local/lib/node_modules/bozon/node_modules/commander/index.js:301:8)
at emitTwo (events.js:106:13)
at Command.emit (events.js:191:7)
at Command.parseArgs (/usr/local/lib/node_modules/bozon/node_modules/commander/index.js:615:12)
at Command.parse (/usr/local/lib/node_modules/bozon/node_modules/commander/index.js:458:21)
at Object.<anonymous> (/usr/local/lib/node_modules/bozon/lib/bin/bozon.js:45:9)
at Module._compile (module.js:556:32)
at Object.Module._extensions..js (module.js:565:10)
at Module.load (module.js:473:32)
at tryModuleLoad (module.js:432:12)
[...]
...occurs for package cmd. for all targets (osx|windows|linux
).
Simply installing the module electron-prebuilt
as devDependency does not solve the issue.
I could reproduce for [email protected]
on Node v5.12.0
and v6.6.0
on OSX 10.12 (Sierra) for a newly scaffolded otherwise untouched app.
I am trying to use the package serialport in a project with no success. I have simplified the project to the following:
bozon new bozon-serialport-test
.bozon start
to verify that the project works as expected.const Serialport = require('serialport);
.Doing this results in the following error.
application.js:2024 Uncaught Error: Could not locate the bindings file. Tried:
โ /Users/john/Documents/Software_Development/Node/bozon_serialport_test/build/serialport.node
โ /Users/john/Documents/Software_Development/Node/bozon_serialport_test/build/Debug/serialport.node
โ /Users/john/Documents/Software_Development/Node/bozon_serialport_test/build/Release/serialport.node
โ /Users/john/Documents/Software_Development/Node/bozon_serialport_test/out/Debug/serialport.node
โ /Users/john/Documents/Software_Development/Node/bozon_serialport_test/Debug/serialport.node
โ /Users/john/Documents/Software_Development/Node/bozon_serialport_test/out/Release/serialport.node
โ /Users/john/Documents/Software_Development/Node/bozon_serialport_test/Release/serialport.node
โ /Users/john/Documents/Software_Development/Node/bozon_serialport_test/build/default/serialport.node
โ /Users/john/Documents/Software_Development/Node/bozon_serialport_test/compiled/6.5.0/darwin/x64/serialport.node
The correct path is /Users/john/Documents/Software_Development/Node/bozon_serialport_test/builds/development/node_modules/serialport/build/Release/serialport.node
.
As suggested here, I ran the (slightly modified) command ./app/node_modules/.bin/electron-rebuild
(since the app node_modules dir is where serialport is). I get the same result.
Also from that page, I tried HOME=~/.electron-gyp node-gyp rebuild --target=1.4.15 --arch=x64 --dist-url=https://atom.io/download/electron
and got the same result.
I also read through this post and tried the following:
yarn global node-pre-gyp
.. . .bozon_serialport_test/app/node_modules/serialport
, I executed node-pre-gyp rebuild
.I am using:
electron 1.4.15,
bozon 0.7.0,
OS X 10.11.6
What is generating those incorrect paths? Is there anything else to try to make this work?
Missing requirement of gulp module in ./lib/utils/bozon.js
I run bozon package
and it fails.
Here's the stack trace:
(node:5361) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
(node:5368) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
/home/tom/thundred/gulpfile.js:5
bozon.task('styles', function () {
^
TypeError: bozon.task is not a function
at Object.<anonymous> (/home/tom/thundred/gulpfile.js:5:7)
at Module._compile (module.js:541:32)
at Object.Module._extensions..js (module.js:550:10)
at Module.load (module.js:458:32)
at tryModuleLoad (module.js:417:12)
at Function.Module._load (module.js:409:3)
at Module.require (module.js:468:17)
at require (internal/module.js:20:19)
at Liftoff.handleArguments (/home/tom/thundred/node_modules/gulp/bin/gulp.js:116:3)
at Liftoff.<anonymous> (/home/tom/thundred/node_modules/liftoff/index.js:193:16)
Here's the contents of my gulpfile.js
:
require('bozon/tasks/all')
var sass = require('gulp-sass')
bozon.task('styles', function () {
return bozon.src('stylesheets/**/*.sass').pipe(sass.sync({
outputStyle: 'compressed',
precision: 10
}).on('error', sass.logError)).pipe(bozon.dest('stylesheets'))
})
I feel like I'm missing something simple here...
Hi,
Thank you for your great job.
It looks have error when package linux when do : bozon package linux.
I tested 'bozon package linux' via linux OS , windows OS, mac OS all have same error.
bozon package mac and win working great.
All test via NodeJS 7.7.3,
and make a new bozon project with bozon,
then do bozon start and got great running.
then do bozon package linux no any other touch.
folder: packages/linux-unpacked looks good and have all unpacked files.
$bozon package linux
[11:24:51] Using gulpfile /qtgate/gulpfile.js
[11:24:51] Starting 'html'...
[11:24:51] Starting 'images'...
[11:24:51] Starting 'styles'...
[11:24:51] Starting 'scripts:main'...
[11:24:51] Starting 'scripts:renderer'...
[11:24:52] Finished 'images' after 143 ms
[11:24:52] Finished 'html' after 194 ms
[11:24:52] Finished 'styles' after 179 ms
[11:24:52] Version: webpack 1.14.0
Asset Size Chunks Chunk Names
application.js 1.88 kB 0 [emitted] main
[11:24:52] Finished 'scripts:main' after 211 ms
[11:24:52] Finished 'scripts:renderer' after 211 ms
[11:24:52] Starting 'prepare:app'...
[11:24:52] Finished 'prepare:app' after 29 ms
Skip app dependencies rebuild because platform is different
Packaging for linux x64 using electron 1.6.2 to packages/linux-unpacked
Downloading tmp-1535-0-electron-v1.6.2-linux-x64.zip
[> ] 0.0% (0 B/s)
Unhandled rejection Error: Exit code: ENOENT. spawn gm ENOENT
at /qtgate/node_modules/electron-builder-util/src/util.ts:75:16
at exithandler (child_process.js:217:5)
at ChildProcess.errorhandler (child_process.js:229:5)
at emitOne (events.js:96:13)
at ChildProcess.emit (events.js:191:7)
at Process.ChildProcess._handle.onexit (internal/child_process.js:213:12)
at onErrorNT (internal/child_process.js:367:16)
at _combinedTickCallback (internal/process/next_tick.js:80:11)
at process._tickCallback (internal/process/next_tick.js:104:9)
From previous event:
at exec (/qtgate/node_modules/electron-builder-util/src/util.ts:53:3)
at resize (/qtgate/node_modules/electron-builder/src/targets/LinuxTargetHelper.ts:155:16)
at /qtgate/node_modules/electron-builder/src/targets/LinuxTargetHelper.ts:158:46
at Generator.next ()
at go$readdir$cb (/qtgate/node_modules/graceful-fs/graceful-fs.js:149:14)
at FSReqWrap.oncomplete (fs.js:114:15)
From previous event:
at LinuxTargetHelper.createFromIcns (/qtgate/node_modules/electron-builder/out/targets/LinuxTargetHelper.js:216:11)
at /qtgate/node_modules/electron-builder/src/targets/LinuxTargetHelper.ts:54:25
From previous event:
at LinuxTargetHelper.computeDesktopIcons (/qtgate/node_modules/electron-builder/out/targets/LinuxTargetHelper.js:84:11)
Maybe I'm just being dumb but it doesn't seem like the app is auto-refreshing in development.
After creating project i tried this command
bozon start
but nothing happens . I'm using windows
So, I upgrade Bozon to the latest version (0.9.2) and now nothing is working anymore. It won't compile anything anymore because a lot of foldernames changed (I fixed that) and also no node_modules are loaded it seems to only look for CSS files when I use require?
For example, this worked in a previous version:
const $ = require('jquery');
Now I get this error when starting the app with bozon start
:
[ ModuleNotFoundError: Module not found: Error: Can't resolve 'jquery' in '[PATH]/src/javascripts/renderer'
at factory.create (/Users/lars/.npm-global/lib/node_modules/bozon/node_modules/webpack/lib/Compilation.js:823:10)
at factory (/Users/lars/.npm-global/lib/node_modules/bozon/node_modules/webpack/lib/NormalModuleFactory.js:397:22)
at resolver (/Users/lars/.npm-global/lib/node_modules/bozon/node_modules/webpack/lib/NormalModuleFactory.js:130:21)
at asyncLib.parallel (/Users/lars/.npm-global/lib/node_modules/bozon/node_modules/webpack/lib/NormalModuleFactory.js:224:22)
at /Users/lars/.npm-global/lib/node_modules/bozon/node_modules/neo-async/async.js:2830:7
at /Users/lars/.npm-global/lib/node_modules/bozon/node_modules/neo-async/async.js:6877:13
at normalResolver.resolve (/Users/lars/.npm-global/lib/node_modules/bozon/node_modules/webpack/lib/NormalModuleFactory.js:214:25)
at doResolve (/Users/lars/.npm-global/lib/node_modules/bozon/node_modules/enhanced-resolve/lib/Resolver.js:184:12)
at hook.callAsync (/Users/lars/.npm-global/lib/node_modules/bozon/node_modules/enhanced-resolve/lib/Resolver.js:238:5)
at _fn0 (eval at create (/Users/lars/.npm-global/lib/node_modules/bozon/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:15:1)
resolve 'jquery' in '[PATH]/src/javascripts/renderer'
Parsed request is a module
using description file: [PATH]/package.json (relative path: ./src/javascripts/renderer)
Field 'browser' doesn't contain a valid alias configuration
resolve as module
looking for modules in [PATH]/src/stylesheets
using description file: [PATH]/package.json (relative path: ./src/stylesheets)
Field 'browser' doesn't contain a valid alias configuration
using description file: [PATH]/package.json (relative path: ./src/stylesheets/jquery)
no extension
Field 'browser' doesn't contain a valid alias configuration
[PATH]/src/stylesheets/jquery doesn't exist
.wasm
Field 'browser' doesn't contain a valid alias configuration
[PATH]/src/stylesheets/jquery.wasm doesn't exist
.mjs
Field 'browser' doesn't contain a valid alias configuration
[PATH]/src/stylesheets/jquery.mjs doesn't exist
.js
Field 'browser' doesn't contain a valid alias configuration
[PATH]/src/stylesheets/jquery.js doesn't exist
.json
Field 'browser' doesn't contain a valid alias configuration
[PATH]/src/stylesheets/jquery.json doesn't exist
as directory
[PATH]/src/stylesheets/jquery doesn't exist
looking for modules in [PATH]/src/images
using description file: [PATH]/package.json (relative path: ./src/images)
Field 'browser' doesn't contain a valid alias configuration
using description file: [PATH]/package.json (relative path: ./src/images/jquery)
no extension
Field 'browser' doesn't contain a valid alias configuration
[PATH]/src/images/jquery doesn't exist
.wasm
Field 'browser' doesn't contain a valid alias configuration
[PATH]/src/images/jquery.wasm doesn't exist
.mjs
Field 'browser' doesn't contain a valid alias configuration
[PATH]/src/images/jquery.mjs doesn't exist
.js
Field 'browser' doesn't contain a valid alias configuration
[PATH]/src/images/jquery.js doesn't exist
.json
Field 'browser' doesn't contain a valid alias configuration
[PATH]/src/images/jquery.json doesn't exist
as directory
[PATH]/src/images/jquery doesn't exist ]
How do I require node_modules in the latest version?
By the way, if I don't require any node modules it starts and in the devTools I can use require('jquery')
without any problems...
Thanks.
I would like to suggest adding a 'skip install' option to bozon new [name]
, similar to 'yeoman --skip-install'.
Thank you very much.
How to build my Electron app using this script in package.json. I use this to run the same to run apps for my raspberry pi.
"build --armv7l --linux"
Adding the above to scripts and running shows errors
Error: Application entry file "index.js" in the "[path]/dist/linux-armv7l-unpacked/resources/app.asar" does not exist. Seems like a wrong configuration.
Hello I need to add more than two section to the web pack config please help,
webpack.config.js
module.exports = {
externals: ['electron', 'electron-store'],
renderer: { ... },
main: { ... },
another: { ... }
...
};
Hello everybody.
Happy new year.
This is not really an issue but a request for a "how-to" on how to use typescript as main language with bozon. I have an idea but it use "npm" not "bozon" and I don't know if it is the right way to do.
Thank you in advance.
When I create a program in a folder with a whitespace and I start it, I get the following error:
/bin/sh: 1: /home/lars/My: not found
/bin/sh: 1: /home/lars/My: not found
That's all. I just call bozon start
.
The path: /home/lars/My Path/Test Project
OS: Ubuntu 17.10 (also happening on Mac OS High Sierra)
So what should I do?
electron-packager-tf
โ not required anymore.Is this project still alive? Should it be promoted on electron-builder page?
I've had some trouble getting native modules to load correctly in webpack. I was curious why you used this instead of electron-compile
and possibly electron-connect
.
In case I want to use React, in order to use http://reactdesktop.js.org , I just need to add a gulp recipe to transpile jsx files right? Apart from installing needed packages in app/package.json
I guess.
This is my gulpfile.js
:
require('bozon/lib/tasks');
var bozon = require('bozon/lib/bozon');
var jsx = require('gulp-jsx');
bozon.buildTaskBefore('scripts:renderer', 'scripts:jsx', function() {
return bozon.src('javascripts/scripts/**/*.jsx').pipe(jsx({
factory: 'React.createClass'
})).on('error', function(e) { console.log(e); }).pipe(bozon.dest('javascripts/renderer'));
});
Using https://github.com/alexmingoia/gulp-jsx, but it doesn't work, no files are generated in javascripts/renderer
.
Template Literal is fastest, smallest and simplest template engine, because it use JS's literal template feature.
It's 55 times faster than EJS, and it also use less CPU and RAM ressources, so it may be a good idea to use it instead of EJS ๐
Copy runtime dependencies to build directory before packaging
Possible format for runtime dependencies in package.json
:
packaging: {
dependencies: {
...
}
}
node v6.1.0
electron v1.2.2
$ npm install -g bozon
npm WARN deprecated [email protected]: cross-spawn no longer requires a build toolchain, use it instead!
npm WARN deprecated [email protected]: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
npm WARN deprecated [email protected]: lodash@<3.0.0 is no longer maintained. Upgrade to lodash@^4.0.0.
npm WARN deprecated [email protected]: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
npm WARN deprecated [email protected]: Jade has been renamed to pug, please install the latest version of pug instead of jade
/Users/xiaolai/.nvm/versions/node/v6.1.0/bin/bozon -> /Users/xiaolai/.nvm/versions/node/v6.1.0/lib/node_modules/bozon/lib/cli.js
> [email protected] install /Users/xiaolai/.nvm/versions/node/v6.1.0/lib/node_modules/bozon/node_modules/macos-alias
> node-gyp rebuild
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
CXX(target) Release/obj.target/volume/src/volume.o
SOLINK_MODULE(target) Release/volume.node
> [email protected] install /Users/xiaolai/.nvm/versions/node/v6.1.0/lib/node_modules/bozon/node_modules/fsevents
> node-pre-gyp install --fallback-to-build
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
SOLINK_MODULE(target) Release/.node
CXX(target) Release/obj.target/fse/fsevents.o
SOLINK_MODULE(target) Release/fse.node
COPY /Users/xiaolai/.nvm/versions/node/v6.1.0/lib/node_modules/bozon/node_modules/fsevents/lib/binding/Release/node-v48-darwin-x64/fse.node
TOUCH Release/obj.target/action_after_build.stamp
> [email protected] install /Users/xiaolai/.nvm/versions/node/v6.1.0/lib/node_modules/bozon/node_modules/fs-xattr
> node-gyp rebuild
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
CXX(target) Release/obj.target/xattr/src/async.o
CXX(target) Release/obj.target/xattr/src/error.o
CXX(target) Release/obj.target/xattr/src/sync.o
CXX(target) Release/obj.target/xattr/src/util.o
CXX(target) Release/obj.target/xattr/src/xattr.o
SOLINK_MODULE(target) Release/xattr.node
I was very excited discovering bozon, after getting really tired searching for the best electron application skeleton. So, I followed your (very simple) installation guide, issued the command
bozon start
and saw this:
C:\work\monterey-framework\generic-electron-app\generic_app (master)
ฮป bozon start
C:\work\monterey-framework\generic-electron-app\generic_app (master)
The first remedy I tried was to assume that your installation instructions should really be:
npm install -g bozon
bozon new [name]
npm install
however, while I believe that npm install
should be run before bozon start
, even after running npm install
followed by bozon start
, still nothing happend.
My last attempt was to install bozon locally to my project where I want to use it. No changes - bozon start
does me as much good as pushing on my nose :-)
My environment
Can you advise, please?
When i try 'bozon start' the console give me this error:
D:\Node\testbozon>bozon start
events.js:141
throw er; // Unhandled 'error' event
^
Error: spawn gulp ENOENT
at exports._errnoException (util.js:870:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:178:32)
at onErrorNT (internal/child_process.js:344:16)
at nextTickCallbackWith2Args (node.js:442:9)
at process._tickCallback (node.js:356:17)
at Function.Module.runMain (module.js:443:11)
at startup (node.js:139:18)
at node.js:968:3
I tried but couldn't find the problem.
System: Win7x64, Node4.4.3, Gulp(Global), Coffee-Script(Global), Bozon(Global)
First, a wonderful tool to wrap electron packaging! Really great for bootstrap an electron app for the first time.
Here is my environment:
Environment | Version |
---|---|
OS | MacOS Sierra |
electron | 1.4.3 |
electron-builder | 12.0.3 |
electron-packager-tf | 7.5.3 |
gulp | 3.9.1 |
npm | 4.1.2 |
When I'm doing bozon package windows
it is by default generating for 64-bit machine and app is working fine. But I don't find a way to generate for 32-bit machine using bozon.
Is there any option available or am I missing something?
I went through the code and found a temporary workaround by changing
this.electronBuilder.Platform[platform.toUpperCase()].createTarget()
to
this.electronBuilder.Platform[platform.toUpperCase()].createTarget(null,
this.electronBuilder.Arch.ia32, this.electronBuilder.Arch.x64)
here packager.js#L49
Hello folks,
Iยดm new to this, so maybe Iยดm doing something wrong. I had problems creating a new project with version 0.7.8
After installing with NPM I tried to start a new project and got this error:
xyz@machine: $ bozon new project-name
/usr/local/lib/node_modules/bozon/node_modules/inquirer/lib/prompts/list.js:32
let index = _.findIndex(this.opt.choices.realChoices, ({ value }) => value === def);
^
SyntaxError: Unexpected token {
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:387:25)
at Object.Module._extensions..js (module.js:422:10)
at Module.load (module.js:357:32)
at Function.Module._load (module.js:314:12)
at Module.require (module.js:367:17)
at require (internal/module.js:20:19)
at Function.promptModule.restoreDefaultPrompts (/usr/local/lib/node_modules/bozon/node_modules/inquirer/lib/inquirer.js:55:33)
at Object.inquirer.createPromptModule (/usr/local/lib/node_modules/bozon/node_modules/inquirer/lib/inquirer.js:65:16)
at Object.<anonymous> (/usr/local/lib/node_modules/bozon/node_modules/inquirer/lib/inquirer.js:77:28)
I switched back to v0.7.7 and it worked.
hi,
tried running threejs inside a bozon project template
used sample from https://github.com/jeromeetienne/electron-threejs-example
example running on electron boilerplate (just drag and drop.
i tried to change code to bozon , this is what I edited:
`var electron, path, json;
let window;
path = require('path');
json = require('../../package.json');
electron = require('electron');
electron.app.on('ready', function() {
window = new electron.BrowserWindow({
title: json.name,
width: json.settings.width,
height: json.settings.height,
frame: false,
transparent: true
});
window.loadURL('file://' + path.join(__dirname, '..', '..') + '/index.html');
window.on('closed', function() {
window = null;
});
});
`
and this example code:
`const {app, BrowserWindow} = require('electron');
let mainWindow;
// Quit when all windows are closed.
app.on('window-all-closed', function() {
if (process.platform != 'darwin')
app.quit();
});
// This method will be called when Electron has done everything
// initialization and ready for creating browser windows.
app.on('ready', function() {
// Create the browser window.
mainWindow = new BrowserWindow({
width: 800,
height: 600,
frame:false,
transparent: true
});
mainWindow.setIgnoreMouseEvents(true)
// and load the index.html of the app.
mainWindow.loadURL('file://' + __dirname + '/index.html');
// Emitted when the window is closed.
mainWindow.on('closed', function() {
// Dereference the window object, usually you would store windows
// in an array if your app supports multi windows, this is the time
// when you should delete the corresponding element.
mainWindow = null;
});
});
`
but on runnig bozon start nothing happens...
this is the index.html
`<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title></title>
<link rel="stylesheet" href="stylesheets/application.css" />
<script src="javascripts/renderer/application.js" type="text/javascript"></script>
</head>
<body>
<div id="container"></div>
</body>
<script src="javascripts/three.min.js"></script>
<script>
...here code of the example</script>
`
Make coffee processing optional choice on new project create, either with option:
bozon new [project_name] --coffee
or
Add coffee
, typescript
, es6
options to inquirer
I am newbie to web development and trying out electronjs for future development. I would love to contribute Bozon project to support Angular2. Could you guide me to start?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.