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

v0.26.x upgrade issue for iPad mini (ios 9.3) - Unable to load the library due to error #2770

Open
FiveHundredMiles opened this issue Jan 20, 2019 · 8 comments

Comments

@FiveHundredMiles
Copy link

I upgraded my app to v0.26.1. But it doesn't work for iPad Mini (iOS 9.3).
Below is the error message:
Unexpected keyword 'const'. Const declarations are not supported in strict mode.

@CrossEye
Copy link
Member

@FiveHundredMiles:

Do you have more information about where this problem occurs?

@FiveHundredMiles
Copy link
Author

FiveHundredMiles commented Jan 22, 2019

This is the line on the index.html
<script src="js/ramda.min.js"></script>

It (v0.26.1) works on my iPad. But it does not work on my (old) iPad mini.
The browser is Safari.
I rollbacked my code back to v0.25.x, and it worked - not loading issue.

Here is something that I found related to this error:
rails/webpacker#974

Thank you.

@CrossEye
Copy link
Member

CrossEye commented Jan 22, 2019

While I understand what the error is, the only usages I can find of const in, say, https://cdnjs.cloudflare.com/ajax/libs/ramda/0.26.1/ramda.js are in the examples in the comments. I'm not really sure where to look. How do you include Ramda? From a CDN? From an npm install? Something else?

@FiveHundredMiles
Copy link
Author

FiveHundredMiles commented Jan 22, 2019

I downloaded the zip from:
https://github.com/ramda/ramda/archive/v0.26.1.zip

I can see the const in both the ramda.js and ramda.min.js.
I can see the const on line number 2483 in ramda.js

Also, I would like to request a new function R.version? So, it will help resolve issues in the future.

@CrossEye
Copy link
Member

Sure enough. I guess this is removed before the NPM package is published. I've never used this zip file myself.

If you're interested in creating a PR to fix this, please do. (It's not only pipeWith but also thunkify.) If not, I'll try to get to this soon.

@CrossEye
Copy link
Member

I'm not so sure about version. Most users can simply get this from importing package.json. I don't know whether we want to include another non-function or a nullary function for this. I could certainly be convinced though.

@FiveHundredMiles
Copy link
Author

To check the version, this is how jQuery does it:
jQuery().jquery
I'm not sure why they do it this way. Maybe we can do something similar.

The library should support all kind of environments or Use cases.
Also, package.json doesn't provide run-time check.

Just a thought. Thank you.

@davidchambers
Copy link
Member

Also, package.json doesn't provide run-time check.

One can evaluate this expression at run-time:

require('ramda/package.json').version

It won't work in the browser, of course.

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

3 participants