daw icon indicating copy to clipboard operation
daw copied to clipboard

Trying to run the dev environment in the locally html

Open antoinebou12 opened this issue 4 years ago • 1 comments

I was trying to run the project locally using static file index.html

./build.sh dep
./build.sh prod

Error

GET file:///C:/Users/Antoine/Desktop/Code/daw/daw-core/src/actions/closePattern.js net::ERR_FILE_NOT_FOUND
GET file:///C:/Users/Antoine/Desktop/Code/daw/daw-core/src/actions/openPattern.js net::ERR_FILE_NOT_FOUND
GET file:///C:/Users/Antoine/Desktop/Code/daw/daw-core/src/actions/openSynth.js net::ERR_FILE_NOT_FOUND

controls.js:34 Uncaught (in promise) DOMException: Failed to read the 'localStorage' property from 'Window': Access is denied for this document.
    at UIcontrolsInit (file:///C:/Users/Antoine/Desktop/Code/daw/src/ui/controls.js:34:22)
    at UIrun (file:///C:/Users/Antoine/Desktop/Code/daw/src/run.js:33:2)

The last one can be fixed with chrome cookies setting

after fix

Uncaught (in promise) TypeError: Cannot read property 'addEventListener' of undefined
function UIpatternsInit() {
	const orderBuff = new gsuiReorder(),
		orderDrums = new gsuiReorder(),
		orderKeys = new gsuiReorder();
...

The gsuiReorder is missing a opt/root element

I made the project run with

function UIpatternsInit() {
	const orderBuff = new gsuiReorder({
		rootElement: DOM.buffPatterns,
		itemSelector: "#buffPatterns .pattern",
		handleSelector: "#buffPatterns .pattern-grip",
		parentSelector: "#buffPatterns"
	}),
		orderDrums = new gsuiReorder({
			rootElement: DOM.keysPatterns,
			itemSelector: "#drumsPatterns .pattern",
			handleSelector: "#drumsPatterns .pattern-grip",
			parentSelector: "#drumsPatterns"
		}),
		orderKeys = new gsuiReorder({
			rootElement: DOM.drumsPatterns,
			itemSelector: "#keysPatterns .pattern",
			handleSelector: "#keysPatterns .pattern-grip",
			parentSelector: ".synth-patterns"
		});

	window.UIsvgForms.bufferHD.hdMode( true );
	window.UIsvgForms.bufferHD.setDefaultViewbox( 260, 48 );
	DOM.drumsNew.onclick = () => DAW.callAction( "addPatternDrums" );
	DOM.buffPatterns.addEventListener( "click", UIpatternsOnclick.bind( null, "buffer" ) );
	DOM.keysPatterns.addEventListener( "click", UIpatternsOnclick.bind( null, "keys" ) );
	DOM.drumsPatterns.addEventListener( "click", UIpatternsOnclick.bind( null, "drums" ) );
	document.addEventListener( "drop", e => {
		DAW.dropAudioFiles( e.dataTransfer.files );
	} );
	// orderBuff.onchange = UIpatternsReorderChange.bind( null, DOM.buffPatterns );
	// orderDrums.onchange = UIpatternsReorderChange.bind( null, DOM.drumsPatterns );
	// orderKeys.onchange = UIpatternsKeysReorderChange;
	// orderBuff.setDataTransfert =
	// orderKeys.setDataTransfert =
	// orderDrums.setDataTransfert = UIpatternsDataTransfert;

Also there missing the basic samples wav files in assets

antoinebou12 avatar Apr 19 '20 17:04 antoinebou12

Indeed i'm sorry i've pushed some changes in the others dependencies without updating the main one or something like that...

I forgot to check how the LocalStorage react on file:/// too.

mr21 avatar Apr 19 '20 18:04 mr21