使用npm run build:prerender构建我的通用应用程序时出现错误

时间:2019-07-27 08:40:44

标签: angular angular-universal ssr

我正在尝试使用npm run build:prerender构建我的通用应用程序,但是我在这里看到两个错误。

错误

  1. 它抱怨没有看到我为空页设置的 import smbus2 import bme280 port = 1 address = 0x76 bus = smbus2.SMBus(port) calibration_params = bme280.load_calibration_params(bus, address) # the sample method will take a single reading and return a # compensated_reading object data = bme280.sample(bus, address, calibration_params) # the compensated_reading class has the following attributes timest = data.timestamp id = data.id temperature = data.temperature # there is a handy string representation too print(data) import mysql.connector from mysql.connector import Error try: connection = mysql.connector.connect(host='localhost', database='sensor_log', # the compensated_reading class has the following attributes timest = data.timestamp id = data.id temperature = data.temperature # there is a handy string representation too print(data) import mysql.connector from mysql.connector import Error try: connection = mysql.connector.connect(host='localhost', database='sensor_log', user='superadmin', password='Chillipo3') sql_insert_query = """ INSERT INTO `table_sensor_log` (`timestamp`, `sensor_id`, `sensor_value`) VALUES (%s,%s,%s);""" % (timest,id,temperature,) cursor = connection.cursor() result = cursor.execute(sql_insert_query) connection.commit() print ("Record inserted successfully into table_sensor_log table") except mysql.connector.Error as error : connection.rollback() #rollback if any exception occured print("Failed inserting record into table_sensor_log table {}".format(error)) finally: #closing database connection. 的溃败路径
  2. 它也在下面的错误中显示此错误。

    binding.copyFile(src,dest,flags);                                        ^ 错误:EPERM:不允许操作,复制文件'C:\ wamp64 \ www \ naipod4 \ dist \ browser \ assets'->'C:\ wamp64 \ www \ naipod4 \ dist \ static \ assets

请问我该怎么办,我现在在这里呆了近一个星期

1 个答案:

答案 0 :(得分:1)

当我将节点升级到> v8时,我也遇到了同样的错误

fs.js:1919
  binding.copyFile(src, dest, flags);

解决方案是使用npm审核修复程序来升级我的npm软件包,我不确定升级的许多软件包中的哪个解决了问题

相关问题