小编Tin*_*nou的帖子

EJS错误:未定义; 找不到模块'undefined'; 找不到模块'ejs'; 身体没有定义

在O'Reilly的书"Node.js Up and Running"的第2章中,我对"Let's build twitter"节点应用程序感到非常沮丧.

我从未使用过EJS,甚至不知道为EJS文件添加什么扩展名.另外,我无法让我的应用程序正常运行以获取这些错误:

  • 部分未定义
  • 无法找到模块'undefined'在哪里做app.render('index'...
  • 找不到模块'ejs'
  • 身体没有定义

它更令人沮丧,因为它只是第2章,我想知道切换到另一种材料是不是更可取的......

ejs node.js express

5
推荐指数
1
解决办法
5365
查看次数

maven-jaxb2-plugin用于多个模式的VS jaxb2-maven-plugin

我有多个xsd架构,我想解组到同一文件夹下的不同包中target/generated-sources/xjc.我尝试了两个插件,两者似乎都可以正常使用这两种配置但是在maven-jaxb2-plugin的情况下,eclipse插件会无限期地生成类(因为forceRegenerate= true)但是如果我没有指定forceRegenerate它就不会生成我运行时的第二和第三组课程mvn clean package我的配置是否有任何问题?

JAXB2 - Maven的插件

<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jaxb2-maven-plugin</artifactId>
<version>1.6</version>
<executions>
    <execution>
        <id>xjc-scores</id>
        <goals>
            <goal>xjc</goal>
        </goals>
        <configuration>
            <packageName>com.generated.scores</packageName>
            <schemaDirectory>src/main/resources/schemas/scores</schemaDirectory>
        </configuration>
    </execution>
    <execution>
        <id>xjc-videos-ramp</id>
        <goals>
            <goal>xjc</goal>
        </goals>
        <configuration>
            <packageName>com.generated.ramp</packageName>
            <schemaDirectory>src/main/resources/schemas/ramp</schemaDirectory>
            <clearOutputDir>false</clearOutputDir>
        </configuration>
    </execution>
    <execution>
        <id>xjc-schedules</id>
        <goals>
            <goal>xjc</goal>
        </goals>
        <configuration>
            <packageName>com.generated.schedules</packageName>
            <schemaDirectory>src/main/resources/schemas/schedules</schemaDirectory>
            <clearOutputDir>false</clearOutputDir>
        </configuration>
    </execution>
</executions>
<configuration>
</configuration>
</plugin>
Run Code Online (Sandbox Code Playgroud)

Maven的JAXB2-插件

<plugin>
<groupId>org.jvnet.jaxb2.maven2</groupId>
<artifactId>maven-jaxb2-plugin</artifactId>
<version>0.8.3</version>
<executions>
    <execution>
        <id>xjc-scores</id>
        <phase>generate-sources</phase>
        <goals>
            <goal>generate</goal>
        </goals>
        <configuration>
            <generatePackage>com.generated.scores</generatePackage>
            <schemaDirectory>src/main/resources/schemas/scores</schemaDirectory>
            <removeOldOutput>true</removeOldOutput>
        </configuration>
    </execution>
    <execution>
        <id>xjc-ramp</id>
        <phase>generate-sources</phase>
        <goals>
            <goal>generate</goal>
        </goals> …
Run Code Online (Sandbox Code Playgroud)

java eclipse maven maven-jaxb2-plugin jaxb2-maven-plugin

5
推荐指数
1
解决办法
1万
查看次数