bucklescript-testing
bucklescript-testing copied to clipboard
Error loading bucklescript-brunch
Starting to explore the project and trying to do a build. After git clone
repository and npm install
, as well as npm install -g bs-platform
, I ran npm run build
and got the error:
10 Jan 22:26:42 - warn: Loading of bucklescript-brunch failed due to Unexpected token [ Stack trace was suppressed. Run with
LOGGY_STACKS=true
to see the trace.
Setting LOGGY_STACKS to true produced:
10 Jan 22:33:15 - warn: Loading of bucklescript-brunch failed due to Unexpected token [ Syntax 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 (/Users/tstewart/bucklescript-testing/node_modules/coffee-script/lib/coffee-script/register.js:45:36) at Function.Module._load (module.js:314:12) at Module.require (module.js:367:17) at require (internal/module.js:16:19) at /Users/tstewart/bucklescript-testing/node_modules/brunch/lib/utils/plugins.js:76:22 at Array.reduce (native) at module.exports.deps.reduce.getIncludes.then (/Users/tstewart/bucklescript-testing/node_modules/brunch/lib/utils/plugins.js:74:24) at /Users/tstewart/bucklescript-testing/node_modules/brunch/lib/watch.js:130:11
This doesn't make it very clear to me where the unexpected [ is to be found. Any help much appreciated.
Brunch has been going through some edits lately. First of all, what node version are you running? What brunch version?
Also, the brunch plugin is going to be phased out, it was created at a time when bsb
did not exist, and the bucklescript native bsb
does it better entirely. I've not ported this testing repo yet since I've made the change in the new library repo for the OAK-TEA files. You can just make a normal bucklescript project and copy the files over though if you want, that way you can use the newest bucklescript as well. :-)
I have node v5.10.1 and brunch v2.91 on OSX v10.11.6. I didn't know about bsb, I'll check that out and try what you suggest with making a new project from scratch.
Yeah the bucklescript manual talks about bsb and how to set up a project. :-)
Once it is set up with bsb you can quite literally just copy/paste the files you want from this over to it. Later once I finish rewriting some parts and release it as a normal library then you can just import it from npm as any normal npm library. :-)
I'm leaving this open until I figure out the issue or convert to bsb here as well.