Using XDN 2.9.0 and React 16, the application runs using xdn run
locally but when deploying to the XDN we get the following error:
2020-09-10T14:41:25Z - internal error - Error while invoking lambda "f8c0631c34f66a51196247a584f94f69f44f45be35f273d96940e9723b54c052": SyntaxError: Cannot use import statement outside a module
2020-09-10T14:41:25Z - internal error - Runtime.UserCodeSyntaxError: SyntaxError: Cannot use import statement outside a module
at _loadUserApp (/var/runtime/UserFunction.js:98:13)
at Object.module.exports.load (/var/runtime/UserFunction.js:140:17)
at Object.<anonymous> (/var/runtime/index.js:43:30)
at Module._compile (internal/modules/cjs/loader.js:1138:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
at Module.load (internal/modules/cjs/loader.js:986:32)
at Function.Module._...
2020-09-10T14:41:25Z - error - DeployBuild job failed
This is in our xdn.config.js:
module.exports = {
backends: {
origin: {
domainOrIp: process.env.ORIGIN_DOMAIN_OR_IP || 'developer.moovweb.com',
hostHeader: process.env.ORIGIN_HOST_HEADER || 'developer.moovweb.com',
},
},
server: {
path: 'src/server.js'
}
}