Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/node.js/40.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Node.js 在Webstorm中开发的NodeJS/Express项目中未检索Javascript文件_Node.js_Express_Webstorm - Fatal编程技术网

Node.js 在Webstorm中开发的NodeJS/Express项目中未检索Javascript文件

Node.js 在Webstorm中开发的NodeJS/Express项目中未检索Javascript文件,node.js,express,webstorm,Node.js,Express,Webstorm,我正在用Webstorm中的Express做一个NodeJS项目。我正在从一个EJS(HTML)文件引用一个Javascript文件 这是package.json { "name": "application-name", "version": "0.0.1", "private": true, "scripts": { "start": "node app.js" }, "dependencies": {

我正在用Webstorm中的Express做一个NodeJS项目。我正在从一个EJS(HTML)文件引用一个Javascript文件

这是package.json

{
      "name": "application-name",
      "version": "0.0.1",
      "private": true,
      "scripts": {
        "start": "node app.js"
      },
      "dependencies": {
        "express": "3.4.4",
        "ejs": "*"
      }
    }

是不是跟你的一样?你读过我的最后一条评论了吗?如果你为静态中间件发布Express.js代码,这会有所帮助。@lena是的!我也读过你的评论,但问题依然存在。你看过我在你之后的最后两条评论了吗?我发布了这个问题,希望其他人能认同这个问题。好吧,没有你的代码我们无法继续,对不起。我已经没有主意了:(@lena谢谢你一直以来的帮助。我已经粘贴了我所有的代码。如果你还有其他事情,请告诉我。
<!DOCTYPE html>
<html>
<head>
<title><%= title %></title>
<link rel='stylesheet' href='/stylesheets/style.css'/>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js">
</script>
<script src = "public/javascripts/DivManipulations.js">
</script>
<script>


    $(document).ready(function () {
        $("button").click(function () {
            $("h1").toggle(); //This toggle part works
            remoteScriptTest("Hi"); //This remoteSrciptTest does not.
        });
    });

    function testCall(){
        window.alert("Hi");
    }

</script>
</head>
<body style="padding: 0px; margin: 0px;">
<div id="root"></div>

<div style="background-color: red; width: 100px; height: 60px; overflow: auto;">
    <span>Some text comes here</span>
</div>

<h1><%= title %> </h1>
</p>  Welcome to <%= title %> </p>
<button>Click here</button>
</body>
</html>
/**
 * Created by ---- on 11/21/13.
 */

function remoteScriptTest(message){
    window.alert(message);
}
{
      "name": "application-name",
      "version": "0.0.1",
      "private": true,
      "scripts": {
        "start": "node app.js"
      },
      "dependencies": {
        "express": "3.4.4",
        "ejs": "*"
      }
    }