react-component / react-component/slider

SyntaxError: Unexpected token import URGENT

Open
#437 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
3.1k
Forks
768
Avg merge
11d 22h
Merged PRs (30d)
5

Description

I've integrated your plugin, but it fails to run with tests - hope that info below will be sufficient:

✗ npm run test __tests__/components/Editor.test.js

> gigatables-react@2.6.1 test /Users/arthur/www/gigatables_react
> jest --updateSnapshot --verbose "__tests__/components/Editor.test.js"

 FAIL  __tests__/components/Editor.test.js
  ● Test suite failed to run

    /Users/arthur/www/gigatables_react/node_modules/rc-slider/es/Handle.js:1
    ({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,global,jest){import _extends from 'babel-runtime/helpers/extends';
                                                                                             ^^^^^^
    SyntaxError: Unexpected token import

      at transformAndBuildScript (node_modules/jest-runtime/build/transform.js:320:12)
      at Object.<anonymous> (src/components/plugins/RcSlider.js:7:41)
      at Object.<anonymous> (src/components/form/Editor.js:16:43)
  "devDependencies": {
    "babel": "^6.23.0",
    "babel-core": "^6.26.0",
    "babel-jest": "^18.0.0",
    "babel-loader": "^7.1.2",
    "babel-plugin-transform-class-properties": "^6.24.1",
    "babel-preset-es2015": "^6.22.0",
    "babel-preset-react": "^6.23.0",
    "babel-preset-stage-0": "^6.24.1",
    "babel-runtime": "^6.26.0",

Though plugin is smoothly suitable for specific component in my app, I don't see other escape rather then uninstall rc-slider, if that won't be fixed - can't afford to fail tests on one of main components.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running npm run test tests/components/Editor.test.js and inspect the failure in node_modules/rc-slider/es/Handle.js. Trace the imports through src/components/plugins/RcSlider.js and src/components/form/Editor.js, then verify the affected test suite completes without the Unexpected token import error.

Written by the indexing model from the issue text.

Assessment

Tech stack
babel, javascript, react
Domain
build-system, frontend, testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.