Skip to content

yarn build:src fails #844

@gergely-ujvari

Description

@gergely-ujvari

if trying to run yarn build:src, it fails, with the following error message:

$ yarn build:src
yarn run v1.7.0
$ babel-node src/tx/jscodeshift
Generating src/components/addons/MarkerWithLabel.jsx from src/macros/addons/MarkerWithLabel.jsx
TypeError: Invalid attempt to destructure non-iterable instance
    at /home/ujvari/git/01/react-google-maps/node_modules/babel-runtime/helpers/slicedToArray.js:48:13
    at contentToJS (/home/ujvari/git/01/react-google-maps/src/tx/ClassDefinition.js:26:46)
    at /home/ujvari/git/01/react-google-maps/src/tx/ClassDefinition.js:18:12
    at tryCatcher (/home/ujvari/git/01/react-google-maps/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/home/ujvari/git/01/react-google-maps/node_modules/bluebird/js/release/promise.js:512:31)
    at Promise._settlePromise (/home/ujvari/git/01/react-google-maps/node_modules/bluebird/js/release/promise.js:569:18)
    at Promise._settlePromise0 (/home/ujvari/git/01/react-google-maps/node_modules/bluebird/js/release/promise.js:614:10)
    at Promise._settlePromises (/home/ujvari/git/01/react-google-maps/node_modules/bluebird/js/release/promise.js:693:18)
    at Async._drainQueue (/home/ujvari/git/01/react-google-maps/node_modules/bluebird/js/release/async.js:133:16)
    at Async._drainQueues (/home/ujvari/git/01/react-google-maps/node_modules/bluebird/js/release/async.js:143:10)
    at Immediate.Async.drainQueues [as _onImmediate] (/home/ujvari/git/01/react-google-maps/node_modules/bluebird/js/release/async.js:17:14)
    at runCallback (timers.js:696:18)
    at tryOnImmediate (timers.js:667:5)
    at processImmediate (timers.js:649:5)
    at process.topLevelDomainCallback (domain.js:121:23)
child_process.js:643
    throw err;
    ^

After a little debugging I realized, that what is happenning inside ClassDefinition.js that it downloads the html page from https://developers.google.com/maps/documentation/javascript/3.exp/reference and tries to parse it and fails.

This is most probable due to the fact that google changed the structure of that homepage.
Basing the build on an outside html source was never a good way to be reliable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions