Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Npm test in bitbucket pipelines : SyntaxError: Unexpected identifier "Import" #61

Closed
WoodyFleurant opened this issue Jan 27, 2019 · 1 comment

Comments

@WoodyFleurant
Copy link

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

@WoodyFleurant WoodyFleurant changed the title SyntaxError: Unexpected identifier "Import" Npm test in bitbucket pipelines : SyntaxError: Unexpected identifier "Import" Jan 27, 2019
Samuel-Abreu pushed a commit to CamaraDosDeputados/rasa-webchat that referenced this issue Sep 24, 2019
@MatthieuJnon
Copy link
Contributor

If someone is still having this issue, please open a new issue, thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants