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

Error with 0.19 #9

Closed
David-Factor opened this issue Aug 28, 2018 · 3 comments
Closed

Error with 0.19 #9

David-Factor opened this issue Aug 28, 2018 · 3 comments

Comments

@David-Factor
Copy link

Thanks for the great library. I really love the API!

Just installed this in a 0.19 project. I get the following error in the console: SyntaxError: identifier starts immediately after numeric literal

Digging a little deeper it seems the offending line in the compiled js is:

var 1602$elm_feather$FeatherIcons$Icon = function (a) {
	return {$: 'Icon', a: a};
};

Looks like 0.19 assigns your name as a variable. Given that your name is a numeric literal, the js borks.
For details about why this is illegal in js, see: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Identifier_after_number

Not sure what the solution is other than republishing this package under another namespace?

Cheers,
Dave

@1602
Copy link
Collaborator

1602 commented Aug 29, 2018

Hey @David-Factor, we're waiting for bugfix in compiler for elm 0.19: elm/compiler#1763

I also thought about publishing under a safe name, but decided that it would be confusing for users and not very responsible as elm user, because this is just a bug after all, and it may affect not just me or this particular use case, so it is better to have it fixed. So I decided to be patient and wait for new version of compiler (you could imagine, all my work on 0.19 is currently blocked because of this, lol).

@ryan-senn
Copy link

ryan-senn commented Sep 10, 2018

If anyone is looking for a workaround, this is what I'm doing at the moment:

And it should be working. Just remember to check back every now and then and undo all of the above!

@1602
Copy link
Collaborator

1602 commented Sep 24, 2018

elm-feather has now moved to feathericons GH org and elm package published under a new name: feathericons/elm-feather

@1602 1602 closed this as completed Sep 25, 2018
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