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

Issue with "Sails new" originating with Forever module #567

Closed
stefanlegg opened this issue Jul 12, 2013 · 6 comments
Closed

Issue with "Sails new" originating with Forever module #567

stefanlegg opened this issue Jul 12, 2013 · 6 comments

Comments

@stefanlegg
Copy link

Run into this issue if i try to do sails new...
Never experienced this in the past when running sails on my other osx box

/usr/local/Cellar/node/0.10.8/lib/node_modules/sails/node_modules/forever/node_modules/forever-monitor/lib/forever-monitor/monitor.js:117
utile.inherits(Monitor, broadway.App);
      ^
TypeError: Object #<Object> has no method 'inherits'
    at Object.<anonymous> (/usr/local/Cellar/node/0.10.8/lib/node_modules/sails/node_modules/forever/node_modules/forever-monitor/lib/forever-monitor/monitor.js:117:7)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/usr/local/Cellar/node/0.10.8/lib/node_modules/sails/node_modules/forever/node_modules/forever-monitor/lib/index.js:15:24)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
@stefanlegg
Copy link
Author

After digging around and looking at the monitor.js file from Forever I noticed that there was a difference between their require statement and what is shown on the Utile docs...

monitor.js shows

utile = require('utile')

but on https://npmjs.org/package/utile they use require('util')

If I change to using util it seems to make the project successfully, but I'm not sure if this breaks anything else down the line.

@stefanlegg
Copy link
Author

Spoke too soon... wasnt paying close enough attention to notice that the docs were showing that utile is a drop in replacement for util

It appears utile does infact have "inherits" so I'm puzzled as to why it says that method doesnt exist

@particlebanana
Copy link
Contributor

I'm not sure what you are trying to do. Running sails new doesn't use the forever module at all. It's not even a dependency of Sails. Once a Sails app has been generated you can run it with forever by using the app.js file that is generated.

$ forever start app.js

@stefanlegg
Copy link
Author

All im trying to do is run sails new.... If it doesnt use forever at all then why do i get the following when installing sails from npm

npm http 200 https://registry.npmjs.org/forever/-/forever-0.10.0.tgz

and then the ending output also includes forever

sails@0.8.94 /usr/local/lib/node_modules/sails
├── cookie@0.0.6
├── inflection@1.2.5
├── node-uuid@1.4.0
├── async@0.1.22
├── wrench@1.4.4
├── ejs@0.7.2
├── i18n@0.3.5 (sprintf@0.1.1)
├── underscore.string@2.3.0
├── optimist@0.3.4 (wordwrap@0.0.2)
├── coffee-script@1.6.2
├── parley@0.0.2 (underscore@1.4.2)
├── glob@3.1.14 (inherits@1.0.0, graceful-fs@1.1.2, minimatch@0.2.12)
├── fs-extra@0.5.0 (ncp@0.2.0, jsonfile@0.0.1, mkdirp@0.3.5, rimraf@2.1.2)
├── express@2.5.11 (qs@0.4.0, mime@1.2.4, mkdirp@0.3.0)
├── connect-redis@1.4.5 (debug@0.7.2, redis@0.7.0)
├── connect@1.8.3 (qs@0.6.5, mime@1.2.9, formidable@1.0.14)
├── fs-watch-tree@0.2.2 (when@1.3.0)
├── jade@0.28.0 (commander@0.6.1, mkdirp@0.3.5, coffee-script@1.4.0)
├── clean-css@0.10.1 (commander@1.1.0)
├── winston@0.6.2 (cycle@1.0.2, eyes@0.1.8, stack-trace@0.0.6, colors@0.6.0-1, pkginfo@0.2.1, request@2.9.0)
├── lodash@1.2.1
├── uglify-js@2.2.4 (optimist@0.3.5, source-map@0.1.26)
├── hbs@2.1.0 (handlebars@1.0.9)
├── include-all@0.0.6 (underscore.string@2.3.1)
├── sails-dirty@0.7.4 (dirty@0.9.7, underscore@1.4.2, underscore.string@2.3.3)
├── forever@0.10.0 (watch@0.5.1, timespan@2.0.1, pkginfo@0.2.3, utile@0.1.2, cliff@0.1.8, nconf@0.6.1, nssocket@0.3.8, forever-monitor@1.0.1, flatiron@0.2.3)
├── node-typescript@0.1.3 (typescript@0.8.3)
├── asset-rack@2.1.5 (mime@1.2.7, underscore@1.4.4, nib@0.9.1, coffee-script@1.4.0, stylus@0.32.0, jade@0.27.7, less@1.3.3, node-sassy@0.0.1, snockets@1.3.8, markdown@0.4.0, browserify@1.17.3, pkgcloud@0.6.6)
└── socket.io@0.9.6 (policyfile@0.0.4, redis@0.6.7, socket.io-client@0.9.6)

The pathing of my error even says that it is looking for forever within sails....

@stefanlegg
Copy link
Author

forever is also listed as a dependency on line 82

@stefanlegg
Copy link
Author

I uninstalled node, npm, and all modules and started from scratch. Seems to work now.
Previously the only thing I had installed before Sails was meteor... so still unsure what I was getting that error.

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

No branches or pull requests

2 participants