Nativescript-socketio:错误:com.tns.NativeScriptException:找不到模块:" nativescript-socketio"

时间:2016-11-17 12:43:41

标签: nativescript angular2-nativescript

在Mac上运行this应用程序,tns 2.4.0 npm 3.10.9 它使用nativescript-socketio模块。 错误:

<?xml version="1.0" encoding="UTF-8"?>
<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="Reubicados" language="groovy" pageWidth="612" pageHeight="792" columnWidth="552" leftMargin="30" rightMargin="30" topMargin="15" bottomMargin="5">
    <parameter name="FInicio" class="java.util.Date">
        <defaultValueExpression><![CDATA[]]></defaultValueExpression>
    </parameter>
    <parameter name="FFin" class="java.util.Date"/>
    <queryString>
        <![CDATA[some query]]>
    </queryString>
    <field name="ayudante_situacion_laboral_FechaInicio" class="java.sql.Date"/>
    <field name="ayudante_situacion_laboral_FechaFin" class="java.sql.Date"/>
    <field name="ayudante_situacion_laboral_Cant_Horas" class="java.lang.Double"/>
    <field name="ayudante_situacion_laboral_Descripcion" class="java.lang.String"/>
    <field name="ayudante_Registro" class="java.lang.Integer"/>
    <field name="ayudante_Nombre" class="java.lang.String"/>
    <field name="situacion_laboral_Estado" class="java.lang.String"/>
    <variable name="SUM" class="java.lang.Double" resetType="Group" resetGroup="nombreGroup" calculation="Sum">
        <variableExpression><![CDATA[$F{ayudante_situacion_laboral_Cant_Horas}]]></variableExpression>
    </variable>
    <group name="nombreGroup">
        <groupExpression><![CDATA[$F{ayudante_Nombre}]]></groupExpression>
        <groupFooter>
            <band height="1">
                <line>
                    <reportElement x="0" y="0" width="488" height="1"/>
                </line>
                <line>
                    <reportElement x="488" y="0" width="61" height="1"/>
                </line>
            </band>
        </groupFooter>
    </group>
    <title>
        <band height="93">
            <staticText>
                <reportElement x="0" y="70" width="549" height="23"/>
                <textElement textAlignment="Center" verticalAlignment="Middle" lineSpacing="Single">
                    <font size="8"/>
                </textElement>
                <text><![CDATA[Carretera de la Subplanta No.76 e/Alambique y CalleC. Rpto SubPlanta,SantaClara, VillaClara,Cuba.
Teléfonos: 204782 Fax: 202753 Email: gustavo@ecvcl.cupet.cu
]]></text>
            </staticText>
            <image>
                <reportElement mode="Opaque" x="248" y="0" width="156" height="70"/>
                <imageExpression class="java.lang.String"><![CDATA["C:\\Users\\yanet\\Desktop\\logo.jpg"]]></imageExpression>
            </image>
        </band>
    </title>
    <pageHeader>
        <band height="64">
            <staticText>
                <reportElement x="0" y="0" width="549" height="44"/>
                <textElement textAlignment="Center" verticalAlignment="Middle" lineSpacing="Single">
                    <font fontName="Arial" size="12"/>
                </textElement>
                <text><![CDATA[MODELO DE REUBICADOS
UEB DE TRANSPORTE
GRUPO DE TRÁFICO
]]></text>
            </staticText>
            <staticText>
                <reportElement x="0" y="44" width="404" height="20"/>
                <textElement textAlignment="Right" verticalAlignment="Middle" lineSpacing="Single">
                    <font fontName="Arial" size="12" isBold="true"/>
                </textElement>
                <text><![CDATA[Tabla # 1. Relación de Reubicados del mes de: ]]></text>
            </staticText>
        </band>
    </pageHeader>
    <columnHeader>
        <band height="20">
            <staticText>
                <reportElement x="0" y="0" width="47" height="20"/>
                <box>
                    <pen lineWidth="1.0"/>
                    <topPen lineWidth="1.0"/>
                    <leftPen lineWidth="1.0"/>
                    <bottomPen lineWidth="1.0"/>
                    <rightPen lineWidth="1.0"/>
                </box>
                <textElement textAlignment="Center" verticalAlignment="Middle" lineSpacing="Single">
                    <font fontName="Arial" size="12"/>
                </textElement>
                <text><![CDATA[Registro]]></text>
            </staticText>
            <staticText>
                <reportElement x="258" y="0" width="38" height="20"/>
                <box>
                    <pen lineWidth="1.0"/>
                    <topPen lineWidth="1.0"/>
                    <leftPen lineWidth="1.0"/>
                    <bottomPen lineWidth="1.0"/>
                    <rightPen lineWidth="1.0"/>
                </box>
                <textElement textAlignment="Center" verticalAlignment="Middle" lineSpacing="Single">
                    <font fontName="Arial" size="12"/>
                </textElement>
                <text><![CDATA[Horas]]></text>
            </staticText>
            <staticText>
                <reportElement x="189" y="0" width="69" height="20"/>
                <box>
                    <pen lineWidth="1.0"/>
                    <topPen lineWidth="1.0"/>
                    <leftPen lineWidth="1.0"/>
                    <bottomPen lineWidth="1.0"/>
                    <rightPen lineWidth="1.0"/>
                </box>
                <textElement textAlignment="Center" verticalAlignment="Middle" lineSpacing="Single">
                    <font fontName="Arial" size="12"/>
                </textElement>
                <text><![CDATA[Día]]></text>
            </staticText>
            <staticText>
                <reportElement x="296" y="0" width="192" height="20"/>
                <box>
                    <pen lineWidth="1.0"/>
                    <topPen lineWidth="1.0"/>
                    <leftPen lineWidth="1.0"/>
                    <bottomPen lineWidth="1.0"/>
                    <rightPen lineWidth="1.0"/>
                </box>
                <textElement textAlignment="Center" verticalAlignment="Middle" lineSpacing="Single">
                    <font fontName="Arial" size="12"/>
                </textElement>
                <text><![CDATA[Actividad]]></text>
            </staticText>
            <staticText>
                <reportElement x="47" y="0" width="142" height="20"/>
                <box>
                    <pen lineWidth="1.0"/>
                    <topPen lineWidth="1.0"/>
                    <leftPen lineWidth="1.0"/>
                    <bottomPen lineWidth="1.0"/>
                    <rightPen lineWidth="1.0"/>
                </box>
                <textElement textAlignment="Center" verticalAlignment="Middle" lineSpacing="Single">
                    <font fontName="Arial" size="12"/>
                </textElement>
                <text><![CDATA[Nombre y Apellidos]]></text>
            </staticText>
            <staticText>
                <reportElement x="488" y="0" width="61" height="20"/>
                <box>
                    <pen lineWidth="1.0"/>
                    <topPen lineWidth="1.0"/>
                    <leftPen lineWidth="1.0"/>
                    <bottomPen lineWidth="1.0"/>
                    <rightPen lineWidth="1.0"/>
                </box>
                <textElement textAlignment="Center" verticalAlignment="Middle" lineSpacing="Single">
                    <font fontName="Arial" size="12"/>
                </textElement>
                <text><![CDATA[Total]]></text>
            </staticText>
        </band>
    </columnHeader>
    <detail>
        <band height="21">
            <staticText>
                <reportElement x="0" y="0" width="47" height="21"/>
                <box>
                    <leftPen lineWidth="1.0"/>
                    <rightPen lineWidth="1.0"/>
                </box>
                <textElement textAlignment="Center" verticalAlignment="Middle" lineSpacing="Single"/>
                <text><![CDATA[]]></text>
            </staticText>
            <staticText>
                <reportElement x="47" y="0" width="142" height="21"/>
                <box>
                    <leftPen lineWidth="1.0"/>
                    <rightPen lineWidth="1.0"/>
                </box>
                <textElement textAlignment="Center" verticalAlignment="Middle" lineSpacing="Single"/>
                <text><![CDATA[]]></text>
            </staticText>
            <textField>
                <reportElement x="0" y="0" width="47" height="21">
                    <printWhenExpression><![CDATA[$V{nombreGroup_COUNT}==1]]></printWhenExpression>
                </reportElement>
                <box>
                    <pen lineWidth="1.0"/>
                    <topPen lineWidth="0.0"/>
                    <leftPen lineWidth="1.0"/>
                    <bottomPen lineWidth="0.0"/>
                    <rightPen lineWidth="1.0"/>
                </box>
                <textElement textAlignment="Center" verticalAlignment="Middle" lineSpacing="Single">
                    <font fontName="Arial" size="12"/>
                </textElement>
                <textFieldExpression class="java.lang.String"><![CDATA[$F{ayudante_Registro}]]></textFieldExpression>
            </textField>
            <textField pattern="###0.00">
                <reportElement x="258" y="0" width="38" height="21"/>
                <box>
                    <pen lineWidth="1.0"/>
                    <topPen lineWidth="1.0"/>
                    <leftPen lineWidth="1.0"/>
                    <bottomPen lineWidth="1.0"/>
                    <rightPen lineWidth="1.0"/>
                </box>
                <textElement textAlignment="Center" verticalAlignment="Middle" lineSpacing="Single">
                    <font fontName="Arial" size="12"/>
                </textElement>
                <textFieldExpression class="java.lang.String"><![CDATA[$F{ayudante_situacion_laboral_Cant_Horas}]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement x="47" y="0" width="142" height="21">
                    <printWhenExpression><![CDATA[$V{nombreGroup_COUNT}==1]]></printWhenExpression>
                </reportElement>
                <box>
                    <leftPen lineWidth="1.0"/>
                    <rightPen lineWidth="1.0"/>
                </box>
                <textElement textAlignment="Center" verticalAlignment="Middle" lineSpacing="Single">
                    <font fontName="Arial" size="12"/>
                </textElement>
                <textFieldExpression class="java.lang.String"><![CDATA[$F{ayudante_Nombre}]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement x="296" y="0" width="192" height="21"/>
                <box>
                    <pen lineWidth="1.0"/>
                    <topPen lineWidth="1.0"/>
                    <leftPen lineWidth="1.0"/>
                    <bottomPen lineWidth="1.0"/>
                    <rightPen lineWidth="1.0"/>
                </box>
                <textElement textAlignment="Center" verticalAlignment="Middle" lineSpacing="Single">
                    <font fontName="Arial" size="12"/>
                </textElement>
                <textFieldExpression class="java.lang.String"><![CDATA[$F{ayudante_situacion_laboral_Descripcion}]]></textFieldExpression>
            </textField>
            <staticText>
                <reportElement x="488" y="0" width="61" height="21"/>
                <box>
                    <leftPen lineWidth="1.0"/>
                    <rightPen lineWidth="1.0"/>
                </box>
                <textElement textAlignment="Center" verticalAlignment="Middle" lineSpacing="Single"/>
                <text><![CDATA[]]></text>
            </staticText>
            <textField evaluationTime="Group" evaluationGroup="nombreGroup">
                <reportElement x="488" y="0" width="61" height="21">
                    <printWhenExpression><![CDATA[$V{nombreGroup_COUNT}==1]]></printWhenExpression>
                </reportElement>
                <box>
                    <leftPen lineWidth="1.0"/>
                    <rightPen lineWidth="1.0"/>
                </box>
                <textElement textAlignment="Center" verticalAlignment="Middle" lineSpacing="Single">
                    <font fontName="Arial" size="12"/>
                </textElement>
                <textFieldExpression class="java.lang.String"><![CDATA[$V{SUM}]]></textFieldExpression>
            </textField>
            <textField pattern="dd/MM">
                <reportElement x="189" y="0" width="69" height="21"/>
                <box>
                    <pen lineWidth="1.0"/>
                    <topPen lineWidth="1.0"/>
                    <leftPen lineWidth="1.0"/>
                    <bottomPen lineWidth="1.0"/>
                    <rightPen lineWidth="1.0"/>
                </box>
                <textElement textAlignment="Center" verticalAlignment="Middle" lineSpacing="Single">
                    <font fontName="Arial" size="12"/>
                </textElement>
                <textFieldExpression class="java.lang.String"><![CDATA[$F{ayudante_situacion_laboral_FechaInicio}]]></textFieldExpression>
            </textField>
        </band>
    </detail>
    <pageFooter>
        <band height="136">
            <image>
                <reportElement x="485" y="30" width="64" height="96"/>
                <imageExpression class="java.lang.String"><![CDATA["C:\\Users\\yanet\\Desktop\\3.jpg"]]></imageExpression>
            </image>
            <image>
                <reportElement x="248" y="32" width="146" height="94"/>
                <imageExpression class="java.lang.String"><![CDATA["C:\\Users\\yanet\\Desktop\\2.jpg"]]></imageExpression>
            </image>
            <image>
                <reportElement x="404" y="42" width="81" height="68"/>
                <imageExpression class="java.lang.String"><![CDATA["C:\\Users\\yanet\\Desktop\\2.png"]]></imageExpression>
            </image>
            <staticText>
                <reportElement x="0" y="0" width="552" height="30"/>
                <textElement textAlignment="Center" verticalAlignment="Middle" lineSpacing="Single">
                    <font fontName="Arial" size="12" isUnderline="false"/>
                </textElement>
                <text><![CDATA[Elaborado: Alexander F. Meneses Mederos                  Aprobado:
                      Técnico “A” Transporte                                                Jefe de Tráfico
]]></text>
            </staticText>
        </band>
    </pageFooter>
</jasperReport>

此错误出现在tns2.4.0中,但不出现在tns2.5.0中。

1 个答案:

答案 0 :(得分:0)

确保在组件中添加了[moduleId:module.id]。

例如:

@Component({ moduleId:module.id, 选择器:'ns-选择器', templateUrl:'selector.component.html'})