简体   繁体   English

如何在本地运行node.js应用程序进行开发

[英]How to run node.js applications locally for development

I am new to node.js ,today I joined in another team they are working with node.js,backbone.js,marionette.js and sqlserver .I have an idea about backbone,Marionette but I never work on node.js .They asked me to clone the git repository,As per their suggestion I installed node.js . 我是node.js新手,今天我加入了另一个团队,他们正在使用node.js,backbone.js,marionette.js and sqlserver 。我对backbone,Marionette有所了解backbone,Marionette但我从未从事过node.js工作。让我克隆git存储库,根据他们的建议,我安装了node.js

在此处输入图片说明

After cloning the repository,I got the files just in the following way. 克隆存储库后,我仅通过以下方式获取文件。

在此处输入图片说明

I opened node_modules folder,It has nearly 10 sub-folders are there. 我打开了node_modules文件夹,那里有近10个子文件夹。

在此处输入图片说明

node-sqlserver doesn't have any files inside.might be because of that I am getting the following error while server running time. node-sqlserver没有任何文件。可能是因为在服务器运行时出现以下错误。

I ran the server with the following command 我使用以下命令运行服务器

node server.js local

getting the following error 得到以下错误

在此处输入图片说明

I don't know,why I am getting.can anyone help me. 我不知道,为什么我要得到。有人可以帮我吗。

Thanks. 谢谢。

You need to install all the dependent modules through npm install , In your case, you need to install node-sqlserver . 您需要通过npm install安装所有从属模块,在这种情况下,您需要安装node-sqlserver

npm install node-sqlserver

Generally your source code will be having a package.json . 通常,您的源代码将具有package.json This file specifies all the dependent modules required to run the application, but here this file is missing. 该文件指定运行该应用程序所需的所有从属模块,但是此处缺少此文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM