GithubHelp home page GithubHelp logo

Comments (6)

tochman avatar tochman commented on July 27, 2024 1

For me, the solution was to go into pages and change all instances of export to module.exports =

i.e. in page.js

const loadingSpinner = '.lds-spinner';

export const pageElements = {
  loadingSpinner,
};

became

const loadingSpinner = '.lds-spinner';

module.exports.pageElements = {
  loadingSpinner,
};

I'll be happy to submit a PR if you accept contributions @drptbl

from synpress.

drptbl avatar drptbl commented on July 27, 2024

@wrobe0709 Thanks for reporting, I will look in to it (in future).

from synpress.

tochman avatar tochman commented on July 27, 2024

Hi,

I'm using create react app and face a similar issue:

export const pageElements = {
^^^^^^

SyntaxError: Unexpected token 'export'
    at wrapSafe (internal/modules/cjs/loader.js:986:16)
    at Module._compile (internal/modules/cjs/loader.js:1034:27)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1108:10)
    at Module.load (internal/modules/cjs/loader.js:935:32)
    at Module._load (internal/modules/cjs/loader.js:776:14)
    at Function.f._load (electron/js2c/asar_bundle.js:5:12684)
    at Module.require (internal/modules/cjs/loader.js:959:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at Object.<anonymous> (/Users/thomasochman/Projects/testing_workshops/purchase_management/node_modules/@synthetixio/synpress/commands/metamask.js:3:26)
    at Module._compile (internal/modules/cjs/loader.js:1078:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1108:10)
    at Module.load (internal/modules/cjs/loader.js:935:32)
    at Module._load (internal/modules/cjs/loader.js:776:14)
    at Function.f._load (electron/js2c/asar_bundle.js:5:12684)
    at Module.require (internal/modules/cjs/loader.js:959:19)
    at require (internal/modules/cjs/helpers.js:88:18)

I'm kind of convinced that I followed the appropriate setup steps, but it seems that we can't use es6 modules this way.

from synpress.

soualid avatar soualid commented on July 27, 2024

Same here.

from synpress.

drptbl avatar drptbl commented on July 27, 2024

@tochman Sure, happy to get some help 🎉. If you won't have time to do it, I will try to do it myself over weekend.

Cheers,
Jakub.

from synpress.

drptbl avatar drptbl commented on July 27, 2024

@wrobe0709 @tochman This one should be already fixed. Please ping me if not. Cheers!

from synpress.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.