Closed ghost closed 7 years ago
@alko79 Which OS are you running that on?
@alchaplinsky windows 10 i checked on developers tool for errors, (sorry for not posting before also i moved threejs in folder vendor)
Failed to load file:///C:/3dview/builds/development/vendor/three.min.js
resource: net::ERR_FILE_NOT_FOUND
if i copy manually the three.min.js in builds and run reload it works. but why calling
is working and calling is not working? shouldn't bozon find any js in the path? sorry if this is a stupid way of asking surely there is a valid reason for that but I cannot figure italternatively can be used a custom task to add loading from vendor folder for "third party" js?
bozon.task('scripts:main', function () {
return bozon.src('javascripts/main/**/*.*').pipe(bozon.dest('javascripts/main'))
})
bozon.task('prepare:app', bozon.hooks, function () {
var settings = new bozon.Settings()
fs.stat(bozon.sourcePath('node_modules'), function (err, stat) {
if (!err) {
var command = settings.platform() === 'windows' ? 'copy' : 'cp'
bozon.spawnSync(command, [
'-r',
bozon.sourcePath('node_modules'),
bozon.destinationPath()
])
}
})
ok that did the trick on win10 but now i have problem with electron builder:
Error: Exit code: ENOENT. spawn node-gyp.cmd ENOENT
at C:\3dview\node_modules\electron-builder-util\src\util.ts:75:16
on building i added a task on gulpfile:
bozon.task('scripts:vendor', function () {
return bozon.src('vendor/**/*.*').pipe(bozon.dest('vendor/'))
})
now electron start works loading the local threejs.min
on packing i got that error, dont know if at this point error is on bozon side or on electron builder since i found a lot pages about node-gyp and windows.
ok it was on electron builder side, i reinstalled all required files for win10 using all 64 bit versions(node, python windwos build tools visual c++ ect) and it worked also on packing the installer in the end you were right, that was win10 not "friendly" to node/electron
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:
and this example code:
but on runnig bozon start nothing happens... this is the index.html