collective-soundworks / soundworks-template Goto Github PK
View Code? Open in Web Editor NEWapplication template for the soundworks framework
License: BSD 3-Clause "New" or "Revised" License
application template for the soundworks framework
License: BSD 3-Clause "New" or "Revised" License
cf. https://lit.dev/
need to update @ircam/simple-components and @soundworks/template-helpers before, having several major version seems to cause weird problems: old templates are not removed
Hi guys,
the node-sass package has made some breaking changes after 3.4.1 which causes the following error when building (I was building [soundfield]):
[soundfield] sass_02-commons.scss (180:3): sass error
Base-level rules cannot contain the parent-selector-referencing character '&'.
I recommend changing in package.json
"node-sass": "^3.4.1",
to
"node-sass": "3.4.1",
... until you have adjusted sass_02-commons.scss to build with the latest (3.7.0) node-sass.
Cheers !
Michael
This is more a question than an issue, but current approach is quite unclear to me.
What I want to do: I want to share code, that is used in the server as well as in the client code, e.g. typescript classes or something like you did with the schemas
in this project. Another example would be e.g. a shared Utils
class.
The issue: While this is working in a basic version, when I e.g. put the types/utils function on the server side, there seems to be an issue, when I use external libs, let's say the lit-html
import as import { html, Template } from "lit-html";
I get the following errors on the client side and at runtime:
Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: [...]\node_modules\lit-element\lit-element.js
require() of ES modules is not supported.
require() of [...]\node_modules\lit-element\lit-element.js from [...]\.build\server\types\uiModule.class.js is an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which defines all .js files in that package scope as ES modules.
Instead rename lit-element.js to end in .cjs, change the requiring code to use import(), or remove "type": "module" from [...]\node_modules\lit-element\package.json.
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1085:13)
at Module.load (internal/modules/cjs/loader.js:933:32)
at Function.Module._load (internal/modules/cjs/loader.js:774:14)
at Module.require (internal/modules/cjs/loader.js:957:19)
at require (internal/modules/cjs/helpers.js:88:18)
at Object.<anonymous> ([...]\.build\server\types\uiModule.class.ts:4:1)
at Module._compile (internal/modules/cjs/loader.js:1068:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1097:10)
at Module.load (internal/modules/cjs/loader.js:933:32)
at Function.Module._load (internal/modules/cjs/loader.js:774:14)
Note: Maybe there is an easy fix to this. I just don't know where to start debugging/fixing this, since everything I searched for didn't provide any solution. There also seem to be some issues with some node versions in general: https://github.com/manuelbieh/authoring-modules-in-node I've upgrade the the latest stable release and the error still exists.
Checking out the plain project and running npm run dev
, the file watcher is not working and manually restarting the application is needed.
System: Windows 10, Version 10.0.19042 Build 19042.
Side note: I've also had some trouble with the babel config and needed to add "loose": true,
here: https://github.com/collective-soundworks/soundworks-template-build/blob/master/src/build-application.js#L81
Since I can't find any information about changing the logging level within the production environment, I can't debug the whole process.
It seems like something is going wrong if the environment is switched (resources are generated and minified already).
This is reproducible with the current checked in template project in a clean state.
I'm happy about any feedback regarding this issue.
looking forward to experimenting with this!
after pulling this repository on my machine, i run an npm install (also sudo npm install -g), and a bunch of errors come back. then i go into src/server and try to run the index.es6.js file.
elliott:soundworks-template mrtunes$ sudo npm install
npm WARN package.json [email protected] No repository field.
npm WARN deprecated [email protected]: Deprecated. Check out [gulp-babel](https://github.com/babel/gulp-babel) instead.
npm ERR! Failed resolving git HEAD (https://github.com/collective-soundworks/soundworks.git) fatal: ambiguous argument 'v0.3.0': unknown revision or path not in the working tree.
npm ERR! Failed resolving git HEAD (https://github.com/collective-soundworks/soundworks.git) Use '--' to separate paths from revisions, like this:
npm ERR! Failed resolving git HEAD (https://github.com/collective-soundworks/soundworks.git) 'git <command> [<revision>...] -- [<file>...]'
npm ERR! Failed resolving git HEAD (https://github.com/collective-soundworks/soundworks.git)
npm ERR! Darwin 13.4.0
npm ERR! argv "node" "/usr/local/bin/npm" "install"
npm ERR! node v0.12.1
npm ERR! npm v2.5.1
npm ERR! code 128
npm ERR! Command failed: git rev-list -n1 v0.3.0
npm ERR! fatal: ambiguous argument 'v0.3.0': unknown revision or path not in the working tree.
npm ERR! Use '--' to separate paths from revisions, like this:
npm ERR! 'git <command> [<revision>...] -- [<file>...]'
npm ERR!
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <http://github.com/npm/npm/issues>
npm ERR! Please include the following file with any support request:
npm ERR! /Users/mrtunes/GitHub/soundworks-template/npm-debug.log
trying to run a server:
elliott:server mrtunes$ node index.es6.js
/Users/mrtunes/GitHub/soundworks-template/src/server/index.es6.js:17
class MyPerformance extends serverSide.Performance {
^^^^^
SyntaxError: Unexpected reserved word
at exports.runInThisContext (vm.js:73:16)
at Module._compile (module.js:443:25)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Function.Module.runMain (module.js:501:10)
at startup (node.js:129:16)
at node.js:814:3
Hey, Win10 64bit here. Tried to use npm install
but cmd can't handle &&
and cp
in the postinstall script.
In package.json I changed the following:
"repository": {
...
"run-script-os": "^1.1.5",
...
},
and
"scripts": {
...
"postinstall": "run-script-os",
"postinstall:default": "mkdir -p .vendors/public && cp -R node_modules/@webcomponents/webcomponentsjs .vendors/public",
"postinstall:win32": "Xcopy /E /I /H /Y node_modules\\@webcomponents\\webcomponentsjs .vendors\\public",
...
},
So the default should be used for every OS but Windows. Couldn't test if npm install
now still works on other systems.
$ npm run start
> [email protected] start /Users/lucas/summer-2019/soundworks-template-1
> node bin/runner --start
/Users/lucas/summer-2019/soundworks-template-1/node_modules/soundworks/node_modules/uws/uws.js:44
})();
^
Error: Compilation of µWebSockets has failed and there is no pre-compiled binary available for your system. Please install a supported C++11 compiler and reinstall the module 'uws'.
at /Users/lucas/summer-2019/soundworks-template-1/node_modules/soundworks/node_modules/uws/uws.js:40:19
at Object.<anonymous> (/Users/lucas/summer-2019/soundworks-template-1/node_modules/soundworks/node_modules/uws/uws.js:44:3)
at Module._compile (internal/modules/cjs/loader.js:816:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:827:10)
at Module.load (internal/modules/cjs/loader.js:685:32)
at Function.Module._load (internal/modules/cjs/loader.js:620:12)
at Module.require (internal/modules/cjs/loader.js:723:19)
at require (internal/modules/cjs/helpers.js:14:16)
at Object.<anonymous> (/Users/lucas/summer-2019/soundworks-template-1/node_modules/soundworks/server/services/RawSocket.js:4:1)
at Module._compile (internal/modules/cjs/loader.js:816:30)
I've tried removing node_modules
and reinstalling but that didn't help
sass
by defaultsoundworks-template-helpers
views to use flex
como.education
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.