I am trying to use rasa-webchat Widget in an new ReactJs project but when I do npm test in bitbucket pipeline I get the following error
/opt/atlassian/pipelines/agent/build/node_modules/rasa-webchat/index.js:1 ({"Object.":function(module,exports,require,__dirname,__filename,global,jest){import React from 'react';
SyntaxError: Unexpected identifier
1 | import React, { Component } from 'react';
> 2 | import { Widget } from 'rasa-webchat';
I tried the same code changing the import from rasa-webchat to react-chat-widget and it works fine. So I think there is something wrong happening due to this plugin
I'm using this Docker image on my pipeline: node:11.6.0
Here are my dependencies :
"dependencies": {
"rasa-webchat": "github:mrbot-ai/rasa-webchat",
"react": "^15.6.2",
"react-chat-widget": "^2.1.4-1",
"react-dom": "^15.6.2",
"react-scripts": "2.1.3"
}
Any help would be appreciated