[GH-ISSUE #112] Build - browserify fails, does not understand coffeescript #89

Closed
opened 2026-02-26 05:31:18 +03:00 by kerem · 4 comments
Owner

Originally created by @romanr on GitHub (Feb 17, 2014).
Original GitHub issue: https://github.com/NarrativeScience-old/log.io/issues/112

Anyone is able to build it? Tried on different systems, always fails with same error:

log.io# cake browserify
Browserifying src/client.coffee to lib/log.io.js
SyntaxError: Line 2: Unexpected token ILLEGAL while parsing /home/logio/node_modules/log.io/src/client.coffee

It looks like browserify does not understand coffeescript? Is there something that needs to be installed to make it work?

Originally created by @romanr on GitHub (Feb 17, 2014). Original GitHub issue: https://github.com/NarrativeScience-old/log.io/issues/112 Anyone is able to build it? Tried on different systems, always fails with same error: ``` shell log.io# cake browserify Browserifying src/client.coffee to lib/log.io.js SyntaxError: Line 2: Unexpected token ILLEGAL while parsing /home/logio/node_modules/log.io/src/client.coffee ``` It looks like browserify does not understand coffeescript? Is there something that needs to be installed to make it work?
kerem closed this issue 2026-02-26 05:31:18 +03:00
Author
Owner

@romanr commented on GitHub (Feb 17, 2014):

One solution is to add -t coffeify to Cakefile:

exec "#{BROWSERIFY} src/client.coffee -t coffeeify --exports process,require -o #{ __dirname }/lib/log.io.js", (err, stdout, stderr) ->
    console.log stdout + stderr if err

But that produces even stranger error:

# cake browserify
Browserifying src/client.coffee to lib/log.io.js
Error: module "./templates" not found from "/log.io/src/client.coffee"
<!-- gh-comment-id:35247361 --> @romanr commented on GitHub (Feb 17, 2014): One solution is to add `-t coffeify` to Cakefile: ``` exec "#{BROWSERIFY} src/client.coffee -t coffeeify --exports process,require -o #{ __dirname }/lib/log.io.js", (err, stdout, stderr) -> console.log stdout + stderr if err ``` But that produces even stranger error: ``` # cake browserify Browserifying src/client.coffee to lib/log.io.js Error: module "./templates" not found from "/log.io/src/client.coffee" ```
Author
Owner

@msmathers commented on GitHub (Aug 1, 2014):

It looks like you're running the cake task with a newer version of browserify which isn't supported by log.io. If you invoke it via npm's install or run-script, everything should work fine:

npm install
npm run-script prepublish

Otherwise, you'll have to downgrade your system's version of browserify to 1.16.6.

That specific "module not found" error you're getting is a known issue in other forks of Log.io that is still being addressed.

<!-- gh-comment-id:50852083 --> @msmathers commented on GitHub (Aug 1, 2014): It looks like you're running the cake task with a newer version of browserify which isn't supported by log.io. If you invoke it via npm's `install` or `run-script`, everything should work fine: ``` npm install npm run-script prepublish ``` Otherwise, you'll have to downgrade your system's version of browserify to 1.16.6. That specific "module not found" error you're getting is a known issue in other forks of Log.io that is still being addressed.
Author
Owner

@jonnor commented on GitHub (Feb 15, 2015):

@msmathers I seem to be running into the same issue. On recent browserify specifying -t coffeeify --extension=".coffee" gives the parsing error. Specifying only -t coffeeify gives the loading error

However browserify 1.16.6 is lacking some wrappers needed by my code so that is unusable too... Any other know workarounds or fixes?

<!-- gh-comment-id:74404147 --> @jonnor commented on GitHub (Feb 15, 2015): @msmathers I seem to be running into the same issue. On recent browserify specifying `-t coffeeify --extension=".coffee"` gives the parsing error. Specifying only `-t coffeeify` gives the loading error However browserify 1.16.6 is lacking some wrappers needed by my code so that is unusable too... Any other know workarounds or fixes?
Author
Owner

@nelsonomuto commented on GitHub (Sep 2, 2015):

I ran into this issue as well, however running the cake build via npm run-script prepublish resolved it for me.

<!-- gh-comment-id:137140841 --> @nelsonomuto commented on GitHub (Sep 2, 2015): I ran into this issue as well, however running the cake build via npm run-script prepublish resolved it for me.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/log.io-NarrativeScience-old#89
No description provided.