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

Synth was broken when I create a new project or auto restarting server #82

Open
PeachScript opened this issue Mar 11, 2015 · 7 comments

Comments

@PeachScript
Copy link
Contributor

The Synth running well some day ago, but it has some problem after I update the node.

When I start a server by synth server -p 5004 and modify a watching file and refresh the browser, synth give me the following exception:

A file was changed, restarting server
/usr/local/lib/node_modules/synth/lib/commands.js:30
    } else throw err;
                 ^
Error: Module did not self-register.
  at Error (native)
  at Module.load (/Users/some_dir/back/node_modules/synth/node_modules/coffee-script/lib/coffee-script/register.js:45:36)
  at Function.Module._load (module.js:310:12)
  at Module.require (module.js:365:17)
  at require (module.js:384:17)
  at requireBinding (/Users/some_dir/back/node_modules/synth/node_modules/harp/node_modules/terraform/node_modules/node-sass/sass.js:17:14)
  at Object.<anonymous> (/Users/some_dir/back/node_modules/synth/node_modules/harp/node_modules/terraform/node_modules/node-sass/sass.js:24:15)
  at Module._compile (module.js:460:26)
  at Object.Module._extensions..js (module.js:478:10)
  at Module.load (/Users/some_dir/back/node_modules/synth/node_modules/coffee-script/lib/coffee-script/register.js:45:36)
  at Function.Module._load (module.js:310:12)
  at Module.require (module.js:365:17)
  at require (module.js:384:17)
  at Object.<anonymous> (/Users/some_dir/back/node_modules/synth/node_modules/harp/node_modules/terraform/lib/stylesheet/processors/scss.js:1:74)
  at Module._compile (module.js:460:26)
  at Object.Module._extensions..js (module.js:478:10)
  at Module.load (/Users/some_dir/back/node_modules/synth/node_modules/coffee-script/lib/coffee-script/register.js:45:36)
  at Function.Module._load (module.js:310:12)
  at Module.require (module.js:365:17)
  at require (module.js:384:17)
  at /Users/some_dir/back/node_modules/synth/node_modules/harp/node_modules/terraform/lib/stylesheet/index.js:19:28
  at Array.forEach (native)
  at Object.<anonymous> (/Users/some_dir/back/node_modules/synth/node_modules/harp/node_modules/terraform/lib/stylesheet/index.js:18:27)
  at Module._compile (module.js:460:26)
  at Object.Module._extensions..js (module.js:478:10)
  at Module.load (/Users/some_dir/back/node_modules/synth/node_modules/coffee-script/lib/coffee-script/register.js:45:36)
  at Function.Module._load (module.js:310:12)
  at Module.require (module.js:365:17)
  at require (module.js:384:17)
  at Object.<anonymous> (/Users/some_dir/back/node_modules/synth/node_modules/harp/node_modules/terraform/lib/terraform.js:3:19)
  at Module._compile (module.js:460:26)
  at Object.Module._extensions..js (module.js:478:10)
  at Module.load (/Users/some_dir/back/node_modules/synth/node_modules/coffee-script/lib/coffee-script/register.js:45:36)
  at Function.Module._load (module.js:310:12)
  at Module.require (module.js:365:17)
  at require (module.js:384:17)
  at Object.<anonymous> (/Users/some_dir/back/node_modules/synth/node_modules/harp/lib/index.js:3:19)
  at Module._compile (module.js:460:26)
  at Object.Module._extensions..js (module.js:478:10)
  at Module.load (/Users/some_dir/back/node_modules/synth/node_modules/coffee-script/lib/coffee-script/register.js:45:36)
  at Function.Module._load (module.js:310:12)
  at Module.require (module.js:365:17)
  at require (module.js:384:17)
  at Object.<anonymous> (/Users/some_dir/back/node_modules/synth/synth.js:7:12)
  at Module._compile (module.js:460:26)
  at Object.Module._extensions..js (module.js:478:10)
  at Module.load (/Users/some_dir/back/node_modules/synth/node_modules/coffee-script/lib/coffee-script/register.js:45:36)
  at Function.Module._load (module.js:310:12)
  at Module.require (module.js:365:17)
  at require (module.js:384:17)
  at Object.<anonymous> (/Users/some_dir/back/back-app.js:1:75)
  at Module._compile (module.js:460:26)
  at Object.Module._extensions..js (module.js:478:10)
  at Module.load (/Users/some_dir/back/node_modules/synth/node_modules/coffee-script/lib/coffee-script/register.js:45:36)
  at Function.Module._load (module.js:310:12)
  at Module.require (module.js:365:17)
  at require (module.js:384:17)
  at requireUncached (/usr/local/lib/node_modules/synth/lib/requireUncached.js:18:10)
  at loadApp (/usr/local/lib/node_modules/synth/lib/commands.js:25:12)
  at startServer (/usr/local/lib/node_modules/synth/lib/commands.js:100:15)
  at Server.<anonymous> (/usr/local/lib/node_modules/synth/lib/commands.js:93:7)
  at Server.g (events.js:199:16)
  at Server.emit (events.js:104:17)
  at net.js:1392:10
  at process._tickCallback (node.js:355:11)

I try to reinstall the nodeJS and the synth, but got seem error. Then I doubt the problem be cause by me, so I decided create a new project and init it to detect the problem, but I found another problem.

I got three broken JSON file after create the new project:

synth.json:

function (obj) {
obj || (obj = {});
var __t, __p = '';
with (obj) {
__p += '{\n  "name": "' +
((__t = ( appName )) == null ? '' : __t) +
'",\n  "version": "0.0.1"\n}\n';

}
return __p
}

package.json:

function (obj) {
obj || (obj = {});
var __t, __p = '';
with (obj) {
__p += '{\n  "name": "' +
((__t = ( appName )) == null ? '' : __t) +
'",\n  "version": "0.0.1",\n  "dependencies": {\n    "synth": "^' +
((__t = ( synthVersion )) == null ? '' : __t) +
'",\n    "promised-mongo": "^0.11",\n    "bluebird": "^1.0.3",\n    "body-parser": "^1.6.3",\n    "lodash": "^2.4.0"\n  },\n  "devDependencies": {\n  }\n}\n';

}
return __p
}

bower.json:

function (obj) {
obj || (obj = {});
var __t, __p = '';
with (obj) {
__p += '{\n  "name": "' +
((__t = ( appName )) == null ? '' : __t) +
'",\n  "private": true,\n  "dependencies": {\n    "angular": "1.x",\n    "angular-route": "1.x"\n  }\n}\n';

}
return __p
}

How can I fix the problem? Thank you very much! :D

@PeachScript
Copy link
Contributor Author

I found the cause of the second problem, and I create a new pull request in #83

@JonAbrams
Copy link
Owner

Which version of Node did you upgrade to?

@PeachScript
Copy link
Contributor Author

Node: v 0.12.0
NPM: v 2.5.1
node-gyp: v 1.0.2

@JonAbrams
Copy link
Owner

I guess fixes are needed to make it work with Node 0.12 :-|

Thanks for the report!

On Tue, Mar 10, 2015 at 11:06 PM, XiaoShengtao [email protected]
wrote:

Node: v 0.12.0
NPM: v 2.5.1

node-gyp: v 1.0.2

Reply to this email directly or view it on GitHub:
#82 (comment)

@PeachScript
Copy link
Contributor Author

You're welcome, thanks for you create the Synth :D.

Maybe I need reinstall the Node 0.11 or you will fix it quickly?

@JonAbrams
Copy link
Owner

It’ll probably take a while to fix, you’re best off rolling back Node versions, sorry :(

On Tue, Mar 10, 2015 at 11:13 PM, XiaoShengtao [email protected]
wrote:

You're welcome, thanks for you create the Synth :D.

Maybe I need reinstall the Node 0.11 or you will fix it quickly?

Reply to this email directly or view it on GitHub:
#82 (comment)

@PeachScript
Copy link
Contributor Author

Never mind, keep in touch :)

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