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

Not possible to build on Windows #440

Closed
erikarenhill opened this issue May 4, 2020 · 8 comments
Closed

Not possible to build on Windows #440

erikarenhill opened this issue May 4, 2020 · 8 comments
Labels

Comments

@erikarenhill
Copy link
Contributor

erikarenhill commented May 4, 2020

Currently it's not possible to build the project on Windows.

Adding a PR (#441) with a suggested solution using cross-env and babel parameter --extension '.ts'

erikarenhill added a commit to erikarenhill/react-responsive-carousel that referenced this issue May 4, 2020
@ludem
Copy link

ludem commented May 5, 2020

Hi, I got an error on IE11 because of the following lines in Thumbs.js, where shorthand property names (ES2015) are used (not supported in IE11):

 _this.setState(function (_state, props) {
        return {
          itemSize,
          visibleItems,
          firstItem: showArrows ? _this.getFirstItem(props.selectedItem) : 0,
          lastPosition,
          showArrows
        };
      });

@erikarenhill
Copy link
Contributor Author

Hi, I got an error on IE11 because of the following lines in Thumbs.js, where shorthand property names (ES2015) are used (not supported in IE11):

 _this.setState(function (_state, props) {
        return {
          itemSize,
          visibleItems,
          firstItem: showArrows ? _this.getFirstItem(props.selectedItem) : 0,
          lastPosition,
          showArrows
        };
      });

@ludem I think that's more related to #439 ! And if configuring babelrc to allow IE11 it should work as well with this. But I'm waiting for a response from @leandrowd to see if IE11 should be supported before making a PR

@ludem
Copy link

ludem commented May 5, 2020

@erikarenhill You're right, I meant to comment the other thread!

leandrowd added a commit that referenced this issue May 6, 2020
gh-440: Remove env vars to allow building on windows without issues
@leandrowd
Copy link
Owner

I've removed the env var so please pull and check if you can build the new version on windows.

@erikarenhill
Copy link
Contributor Author

I've removed the env var so please pull and check if you can build the new version on windows.

I tried it but the output is just "Successfully compiled 0 files with Babel." meanwhile the output from my PR is showing 6 files. Will try and find why later today (running yarn run lib:build-es)

The style compilation does not run on Windows either due to mkdir reporting incorrect syntax, probably due to the slashes (/ while Windows like \ better). Maybe mkdirp is an option? (https://www.npmjs.com/package/mkdirp), I tried it and that seem to work.

@ludem
Copy link

ludem commented May 7, 2020

If it can help, my issue is totally resolved by the 3.2.7.
Thank you.

@erikarenhill
Copy link
Contributor Author

erikarenhill commented Jun 22, 2020

@leandrowd For babel to work on windows, the .ts,.tsx seems to have to be specified without the single quotes around them: babel/babel#9803 (comment)

I tested this and after removing the single quotes it compiles. Also still must replace mkdir for mkdirp or similiar solution to have it working to build the styles in Windows.

@stale
Copy link

stale bot commented Jul 2, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Jul 2, 2021
@stale stale bot closed this as completed Jul 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants