Vue.js SSR .Net Core 2 NodeInvocationException:未定义vendor_d005eb3fe6af483deeda

时间:2018-07-13 16:56:44

标签: webpack vue.js asp.net-core-2.0 serverside-rendering javascriptservices

我正在尝试在Vue.js / .Net Core 2.1项目中设置SSR。

当我向服务器发出客户端有效负载的初始请求时,出现此错误:

df_grouped = df[['Salary Basis', 'Job Title', 'Hourly Rate', 'Male Count', 'Female Count']]
df_grouped = df_grouped.groupby(['Salary Basis', 'Job Title'], as_index=False)

# Grouped gives us the indices we want for each grouping
# We cannot convert a groupedby object back to a dataframe, so we need to do it manually
# Create a new dataframe to work against
df_aggregated = df_grouped.size().to_frame('Total Count').reset_index()
df_aggregated['Male Count'] = 0
df_aggregated['Female Count'] = 0
df_aggregated['Job Rate'] = 0

def manualAggregations(indices_array):
    temp_df = df.iloc[indices_array]
    return {
        'Male Count': temp_df['Male Count'].sum(),
        'Female Count': temp_df['Female Count'].sum(),
        'Job Rate': temp_df['Hourly Rate'].max()
    }

for name, group in df_grouped:
    ix = df_grouped.indices[name]
    calcDict = manualAggregations(ix)

    for key in calcDict:
        #Salary Basis, Job Title
        columns = list(name)
        df_aggregated.loc[(df_aggregated['Salary Basis'] == columns[0]) & 
                          (df_aggregated['Job Title'] == columns[1]), key] = calcDict[key]

我的renderOnServer.js看起来像:

    df_aggregated['Male Count'].loc[(df_aggregated['Salary Basis'] == columns[0]) & 
                                (df_aggregated['Job Title'] == columns[1])] = df['Male Count'].iloc[ix].sum()

在我看来,问题在于服务器没有对通过单独的Webpack配置生成的我的vendor.js文件的引用。但是我不确定如何给它一个参考?任何帮助表示赞赏。谢谢。

0 个答案:

没有答案