tolmasky / demokit

DemoKit is a Library and Electron app for building product demos and tutorials using web technologies
MIT License
428 stars 17 forks source link

TypeError: demo is not a function #10

Open hemanth opened 7 years ago

hemanth commented 7 years ago
$ demokit 
TypeError: demo is not a function
    at EventEmitter.<anonymous> (/Users/hemanth/.yarn-cache/.global/node_modules/demokit/electron/demokit-run.js:66:19)
    at next (<anonymous>)
    at step (/Users/hemanth/.yarn-cache/.global/node_modules/demokit/electron/demokit-run.js:5:191)
    at /Users/hemanth/.yarn-cache/.global/node_modules/demokit/electron/demokit-run.js:5:437
    at EventEmitter.<anonymous> (/Users/hemanth/.yarn-cache/.global/node_modules/demokit/electron/demokit-run.js:5:99)
    at EventEmitter.on (/Users/hemanth/.yarn-cache/.global/node_modules/demokit/electron/demokit-run.js:33:5)
    at emitOne (events.js:96:13)
    at EventEmitter.emit (events.js:188:7)
    at WebContents.<anonymous> (/Users/hemanth/.yarn-cache/.global/node_modules/demokit/electron/node_modules/electron/dist/Electron.app/Contents/Resources/electron.asar/browser/api/web-contents.js:210:13)
    at emitTwo (events.js:106:13)
    at WebContents.emit (events.js:191:7)

It's failing at this line.

On v6.9.1:

> require('/Users/hemanth/.yarn-cache/.global/node_modules/demokit/electron/demokit-run.js')
/Users/hemanth/.yarn-cache/.global/node_modules/demokit/electron/demokit-run.js:33
    on("ready", async function(event)
                ^^^^^
SyntaxError: missing ) after argument list

Yet to try with harmony flags.

tolmasky commented 7 years ago

Demokit automatically runs it through babel, there might be some issue from doing it through yarn (haven't tried installing it through yarn yet). Also, the path to the demokit script needs to be passed (I think calling it without that won't work).

hemanth commented 7 years ago
demokit new meow
cd meow
demokit 

Same with ^

tolmasky commented 7 years ago

Right I'm saying you have to pass the path in. If you're in meow you would do demokit index.js.

hemanth commented 7 years ago

demokit . works fine 👍

tolmasky commented 7 years ago

Cool I'll make it so passing in nothing uses the current directory

hemanth commented 7 years ago

It's on me!