Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Livescript/Express default template fails with --server on second run #329

Closed
Talljoe opened this issue Dec 23, 2013 · 4 comments
Closed

Comments

@Talljoe
Copy link

Talljoe commented Dec 23, 2013

Using the default template for Livescript with Express fails with SyntaxError the second time it is run with "watch --server".

To reproduce:

  1. % mimosa new proj
  2. Answer the follow questions: Livescript (4), Stylus (4), Dust (1), Express (2), Jade (1)
  You chose LiveScript - http://gkz.github.com/LiveScript/.
  You chose (*) Stylus - http://learnboost.github.com/stylus/.
  You chose (*) Dust - https://github.com/linkedin/dustjs/.
  You chose (*) Express - http://expressjs.com/.
  You chose (*) Jade - http://jade-lang.com/.
  1. % cd proj
  2. % mimosa watch --server"
  3. verify correct behavior
  4. Ctrl-C; repeat step 4
  5. Failure with error:
07:08:52 - Compiled/copied [[ /home/talljoe/Dropbox/Projects/web/proj/public/javascripts/templates.js ]]

/home/talljoe/Dropbox/Projects/web/proj/server.ls:1
exports, require, module, __filename, __dirname) { express = require 'express'
                                                                     ^^^^^^^^^
SyntaxError: Unexpected string
    at Module._compile (module.js:439:25)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (/usr/lib/node_modules/mimosa/node_modules/coffee-script/lib/coffee-script/coffee-script.js:211:36)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at /usr/lib/node_modules/mimosa/node_modules/mimosa-server/lib/plugin.js:144:16
    at Object.cb [as oncomplete] (fs.js:168:19)

Additional information:

Reproduced on Windows 8.1 and CrunchBang Waldorf (Debian Wheezy; wheezy-backports node) Linux with recent installs of node.

07:06:25 - Installing node modules
consolidate@0.9.1 node_modules/consolidate

LiveScript@1.2.0 node_modules/LiveScript
└── prelude-ls@1.0.3

express@3.3.4 node_modules/express
├── methods@0.0.1
├── fresh@0.1.0
├── range-parser@0.0.4
├── cookie-signature@1.0.1
├── debug@0.7.4
├── buffer-crc32@0.2.1
├── cookie@0.1.0
├── mkdirp@0.3.5
├── commander@1.2.0 (keypress@0.1.0)
├── send@0.1.3 (mime@1.2.11)
└── connect@2.8.4 (uid2@0.0.2, pause@0.0.1, qs@0.6.5, bytes@0.2.0, formidable@1.0.14)

jade@0.34.1 node_modules/jade
├── character-parser@1.0.2
├── mkdirp@0.3.5
├── commander@1.3.2 (keypress@0.1.0)
├── monocle@0.1.50 (readdirp@0.2.5)
├── with@1.1.1 (uglify-js@2.4.0)
├── transformers@2.1.0 (promise@2.0.0, css@1.0.8, uglify-js@2.2.5)
└── constantinople@1.0.2 (uglify-js@2.4.8)

Mimosa installation

mimosa@1.3.2 /usr/lib/node_modules/mimosa
├── ansi-color@0.2.1
├── underscore@1.5.2
├── chokidar@0.6.3
├── wrench@1.5.1
├── ejs@0.8.4
├── coco@0.9.1
├── coffee-script@1.6.3
├── hogan.js@2.0.0
├── lodash@1.3.1
├── iced-coffee-script@1.6.3-g
├── dustjs-linkedin@2.0.3
├── commander@1.3.2 (keypress@0.1.0)
├── logmimosa@0.6.0 (growl@1.7.0, date-utils@1.2.12)
├── eco@1.1.0-rc-3 (strscan@1.0.1)
├── LiveScript@1.2.0 (prelude-ls@1.0.3)
├── mimosa-minify-css@1.0.0 (clean-css@2.0.2)
├── stylus@0.39.2 (debug@0.7.4, mkdirp@0.3.5, cssom@0.2.5, sax@0.5.8)
├── mimosa-csslint@1.0.1 (logmimosa@0.5.0, csslint@0.9.10, lodash@2.2.1)
├── nib@1.0.1 (stylus@0.35.1)
├── request@2.27.0 (json-stringify-safe@5.0.0, forever-agent@0.5.0, aws-sign@0.3.0, qs@0.6.6, tunnel-agent@0.3.0, oauth-sign@0.3.0, cookie-jar@0.3.0, node-uuid@1.4.1, mime@1.2.11, hawk@1.0.0, form-data@0.1.2, http-signature@0.10.0)
├── mimosa-require@1.5.2 (requirejs@2.1.6)
├── mimosa-minify-js@1.0.1 (uglify-js@2.4.3)
├── handlebars@1.0.12 (optimist@0.3.7, uglify-js@2.3.6)
├── less@1.5.0 (clean-css@1.0.12, mime@1.2.11, mkdirp@0.3.5, source-map@0.1.31)
├── skelmimosa@0.6.0 (logmimosa@0.5.0, rimraf@2.2.2, request@2.21.0)
├── jade@0.35.0 (character-parser@1.2.0, commander@2.0.0, mkdirp@0.3.5, transformers@2.1.0, monocle@1.1.50, with@1.1.1, constantinople@1.0.2)
├── mimosa-jshint@1.0.2 (logmimosa@0.5.0, lodash@2.2.1, jshint@2.3.0)
├── emblem@0.3.2 (StringScanner@0.0.3, optimist@0.3.7, uglify-js@1.2.6)
├── ractive@0.3.7
├── mimosa-server@1.0.2 (consolidate@0.9.1, logmimosa@0.5.0, dustjs-linkedin@2.0.2, express@3.3.5)
├── mimosa-bower@1.3.3 (chokidar@0.7.0, logmimosa@0.5.0, bower@1.2.6)
└── mimosa-live-reload@1.0.3 (logmimosa@0.5.0, socket.io@0.9.16)
@dbashford
Copy link
Owner

Repro'd locally. Think I know what this is. Stay tuned. Thanks for the awesome bug report!

@dbashford
Copy link
Owner

For now, if you put require 'LiveScript' at the top of your mimosa-config, it'll address this problem. Thinking through permanent fix.

dbashford added a commit to dbashford/mimosa-server that referenced this issue Dec 23, 2013
@dbashford
Copy link
Owner

This should be fixed with 1.3.4 of mimosa. I have some docs to update, but wanted to go ahead and push this out.

Give it a go and let me know if all is good. Thanks!

@Talljoe
Copy link
Author

Talljoe commented Dec 23, 2013

Things appear to be fixed. Thanks for the quick work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants