我是新手,我在MacOS Yosemite版本10.10.4上成功安装了以下内容
当我安装Node和express时,一切都在那一步工作 当我安装边缘时,我在他的网站https://github.com/tjanczuk/edge上关注了tjanczuk的安装步骤 我没有收到任何错误。
我现在尝试运行我的应用
var express = require('express');
var edge = require('edge');
var path = require('path');
var favicon = require('serve-favicon');
var logger = require('morgan');
var cookieParser = require('cookie-parser');
var bodyParser = require('body-parser');
var routes = require('./routes/index');
var users = require('./routes/users');
var getProducts = edge.func('sql', function() {
/*select * from Products*/
});
var getProductByID = edge.func('sql', function() {
/*select * from Products
where ProductID = @productID */
});
var app = express();
app.get('/products',function(req,res){
getProducts(null, function (error, result){
if (error) throw error;
res.json(result);
});
});
app.get('products/:productId', function(req,res){
getProductByID({ productID: req.params.productID},function (error, result){
if (error) throw error;
res.json(result);
});
});
app.listen(process.env.port || 3000);
// view engine setup
app.set('views', path.join(__dirname, 'views'));
app.set('view engine', 'jade');
// uncomment after placing your favicon in /public
//app.use(favicon(__dirname + '/public/favicon.ico'));
app.use(logger('dev'));
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended: false }));
app.use(cookieParser());
app.use(express.static(path.join(__dirname, 'public')));
app.use('/', routes);
app.use('/users', users);
// catch 404 and forward to error handler
app.use(function(req, res, next) {
var err = new Error('Not Found');
err.status = 404;
next(err);
});
// error handlers
// development error handler
// will print stacktrace
if (app.get('env') === 'development') {
app.use(function(err, req, res, next) {
res.status(err.status || 500);
res.render('error', {
message: err.message,
error: err
});
});
}
// production error handler
// no stacktraces leaked to user
app.use(function(err, req, res, next) {
res.status(err.status || 500);
res.render('error', {
message: err.message,
error: {}
});
});
module.exports = app;
我收到sigsegv错误
(lldb) command source -s 1 '/tmp/mono-gdb-commands.HVRhGm'
Process 70604 stopped
* thread #1: tid = 0x2f296, 0x00007fff8b91d902 libsystem_kernel.dylib`__wait4 + 10, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
thread #2: tid = 0x2f297, 0x00007fff8b91851a libsystem_kernel.dylib`semaphore_wait_trap + 10, name = 'OptimizingCompi'
thread #3: tid = 0x2f298, 0x00007fff8b91851a libsystem_kernel.dylib`semaphore_wait_trap + 10, name = 'v8:SweeperThrea'
thread #4: tid = 0x2f299, 0x00007fff8b91851a libsystem_kernel.dylib`semaphore_wait_trap + 10, name = 'v8:SweeperThrea'
thread #5: tid = 0x2f29a, 0x00007fff8b91851a libsystem_kernel.dylib`semaphore_wait_trap + 10, name = 'v8:SweeperThrea'
thread #6: tid = 0x2f29b, 0x00007fff8b91d3fa libsystem_kernel.dylib`__select + 10
thread #7: tid = 0x2f29d, 0x00007fff8b91851a libsystem_kernel.dylib`semaphore_wait_trap + 10
* thread #1: tid = 0x2f296, 0x00007fff8b91d902 libsystem_kernel.dylib`__wait4 + 10, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
* frame #0: 0x00007fff8b91d902 libsystem_kernel.dylib`__wait4 + 10
frame #1: 0x0000000102bd8d16 libmonoboehm-2.0.1.dylib`mono_handle_native_sigsegv + 474
frame #2: 0x0000000102c2f004 libmonoboehm-2.0.1.dylib`mono_arch_handle_altstack_exception + 87
frame #3: 0x0000000102b5053e libmonoboehm-2.0.1.dylib`mono_sigsegv_signal_handler + 375
frame #4: 0x00007fff89540f1a libsystem_platform.dylib`_sigtramp + 26
frame #5: 0x0000000102c3b7ba libmonoboehm-2.0.1.dylib`mono_assembly_get_image + 5
frame #6: 0x00000001017be50a edge.node`ClrFunc::Initialize(args=0x00007fff5fbff2e8) + 596 at clrfunc.cpp:95
frame #7: 0x000000010014159f node`v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&)) + 159
frame #8: 0x0000000100163caa node`v8::internal::Builtin_HandleApiCall(int, v8::internal::Object**, v8::internal::Isolate*) + 538
frame #9: 0x0000221db52060a2
frame #10: 0x0000221db5340c13
frame #11: 0x0000221db52a84f0
frame #12: 0x0000221db5224ac6
frame #13: 0x0000221db52a7306
frame #14: 0x0000221db52a17ec
frame #15: 0x0000221db529df80
frame #16: 0x0000221db5294a45
frame #17: 0x0000221db5294404
frame #18: 0x0000221db526b35f
frame #19: 0x0000221db5269d50
frame #20: 0x0000221db521ef40
frame #21: 0x0000221db521de90
frame #22: 0x00000001002175f3 node`v8::internal::Invoke(bool, v8::internal::Handle<v8::internal::JSFunction>, v8::internal::Handle<v8::internal::Object>, int, v8::internal::Handle<v8::internal::Object>*) + 419
frame #23: 0x000000010012ad5f node`v8::Function::Call(v8::Handle<v8::Value>, int, v8::Handle<v8::Value>*) + 207
frame #24: 0x0000000100548de3 node`node::LoadEnvironment(node::Environment*) + 517
frame #25: 0x000000010054a037 node`node::Start(int, char**) + 305
frame #26: 0x0000000100000e74 node`start + 52
thread #2: tid = 0x2f297, 0x00007fff8b91851a libsystem_kernel.dylib`semaphore_wait_trap + 10, name = 'OptimizingCompi'
frame #0: 0x00007fff8b91851a libsystem_kernel.dylib`semaphore_wait_trap + 10
frame #1: 0x00000001006c6277 node`v8::base::Semaphore::Wait() + 23
frame #2: 0x00000001003feb95 node`v8::internal::OptimizingCompilerThread::Run() + 101
frame #3: 0x00000001006c7c97 node`v8::base::ThreadEntry(void*) + 87
frame #4: 0x00007fff8c268268 libsystem_pthread.dylib`_pthread_body + 131
frame #5: 0x00007fff8c2681e5 libsystem_pthread.dylib`_pthread_start + 176
frame #6: 0x00007fff8c26641d libsystem_pthread.dylib`thread_start + 13
thread #3: tid = 0x2f298, 0x00007fff8b91851a libsystem_kernel.dylib`semaphore_wait_trap + 10, name = 'v8:SweeperThrea'
frame #0: 0x00007fff8b91851a libsystem_kernel.dylib`semaphore_wait_trap + 10
frame #1: 0x00000001006c6277 node`v8::base::Semaphore::Wait() + 23
frame #2: 0x00000001002e7217 node`v8::internal::SweeperThread::Run() + 39
frame #3: 0x00000001006c7c97 node`v8::base::ThreadEntry(void*) + 87
frame #4: 0x00007fff8c268268 libsystem_pthread.dylib`_pthread_body + 131
frame #5: 0x00007fff8c2681e5 libsystem_pthread.dylib`_pthread_start + 176
frame #6: 0x00007fff8c26641d libsystem_pthread.dylib`thread_start + 13
thread #4: tid = 0x2f299, 0x00007fff8b91851a libsystem_kernel.dylib`semaphore_wait_trap + 10, name = 'v8:SweeperThrea'
frame #0: 0x00007fff8b91851a libsystem_kernel.dylib`semaphore_wait_trap + 10
frame #1: 0x00000001006c6277 node`v8::base::Semaphore::Wait() + 23
frame #2: 0x00000001002e7217 node`v8::internal::SweeperThread::Run() + 39
frame #3: 0x00000001006c7c97 node`v8::base::ThreadEntry(void*) + 87
frame #4: 0x00007fff8c268268 libsystem_pthread.dylib`_pthread_body + 131
frame #5: 0x00007fff8c2681e5 libsystem_pthread.dylib`_pthread_start + 176
frame #6: 0x00007fff8c26641d libsystem_pthread.dylib`thread_start + 13
thread #5: tid = 0x2f29a, 0x00007fff8b91851a libsystem_kernel.dylib`semaphore_wait_trap + 10, name = 'v8:SweeperThrea'
frame #0: 0x00007fff8b91851a libsystem_kernel.dylib`semaphore_wait_trap + 10
frame #1: 0x00000001006c6277 node`v8::base::Semaphore::Wait() + 23
frame #2: 0x00000001002e7217 node`v8::internal::SweeperThread::Run() + 39
frame #3: 0x00000001006c7c97 node`v8::base::ThreadEntry(void*) + 87
frame #4: 0x00007fff8c268268 libsystem_pthread.dylib`_pthread_body + 131
frame #5: 0x00007fff8c2681e5 libsystem_pthread.dylib`_pthread_start + 176
frame #6: 0x00007fff8c26641d libsystem_pthread.dylib`thread_start + 13
thread #6: tid = 0x2f29b, 0x00007fff8b91d3fa libsystem_kernel.dylib`__select + 10
frame #0: 0x00007fff8b91d3fa libsystem_kernel.dylib`__select + 10
frame #1: 0x000000010065d073 node`uv__stream_osx_select + 321
frame #2: 0x000000010065eff0 node`uv__thread_start + 25
frame #3: 0x00007fff8c268268 libsystem_pthread.dylib`_pthread_body + 131
frame #4: 0x00007fff8c2681e5 libsystem_pthread.dylib`_pthread_start + 176
frame #5: 0x00007fff8c26641d libsystem_pthread.dylib`thread_start + 13
thread #7: tid = 0x2f29d, 0x00007fff8b91851a libsystem_kernel.dylib`semaphore_wait_trap + 10
frame #0: 0x00007fff8b91851a libsystem_kernel.dylib`semaphore_wait_trap + 10
frame #1: 0x0000000102d12f85 libmonoboehm-2.0.1.dylib`mono_sem_wait + 20
frame #2: 0x0000000102ccf5fa libmonoboehm-2.0.1.dylib`finalizer_thread + 83
frame #3: 0x0000000102cb223d libmonoboehm-2.0.1.dylib`start_wrapper + 380
frame #4: 0x0000000102d17c52 libmonoboehm-2.0.1.dylib`inner_start_thread + 210
frame #5: 0x0000000102d32ffb libmonoboehm-2.0.1.dylib`GC_start_routine + 83
frame #6: 0x00007fff8c268268 libsystem_pthread.dylib`_pthread_body + 131
frame #7: 0x00007fff8c2681e5 libsystem_pthread.dylib`_pthread_start + 176
frame #8: 0x00007fff8c26641d libsystem_pthread.dylib`thread_start + 13
=================================================================
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
=================================================================
我做错了什么?