我试图开始使用node.js主要用于学习目的,但我肯定会看到我将在未来的项目中使用的一些潜力.
我的问题 - 我在Centos服务器上使用SSH并完成了本教程:https://www.digitalocean.com/community/articles/how-to-install-and-run-a-node-js-app -酮的CentOS-6-4-64bit
在"创建快速应用程序"部分之前,一切都很顺利.当我在命令行上键入"express hello"时,出现此错误:
terminate called after throwing an instance of 'St9bad_alloc'
what(): std::bad_alloc
Aborted (core dumped)
Run Code Online (Sandbox Code Playgroud)
然后目录中会有一个文件(例如:core.1233),似乎有行话 - 但以前肯定不存在.
我也去了http://nodejs.org网站,试图用那里的代码创建简单的Web服务器.我创建了example.js文件,当我输入"node example.js"时,我也得到:
terminate called after throwing an instance of 'St9bad_alloc'
what(): std::bad_alloc
Aborted (core dumped)
Run Code Online (Sandbox Code Playgroud)
......和以前一样
我是一名程序员(通常是PHP,MySQL等),在服务器或命令行上没有多少工作 - 但我可以"充分利用".问题是 - 除了快速谷歌搜索告诉我的内容之外,我不知道这意味着什么 - 与记忆有关?任何帮助都非常感谢!
(另外,当我键入"node --version"时,我确实得到版本v0.10.8,所以我非常确定节点是否正确安装.如果我创建example.js文件只能说"console.log('test') ;",它仍然终止并给出相同的错误.它永远不会输出."
谢谢!