Skip to content

Unexpected token { #76

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

Closed
plesiecki opened this issue Jun 21, 2016 · 6 comments
Closed

Unexpected token { #76

plesiecki opened this issue Jun 21, 2016 · 6 comments
Assignees
Labels
type: bug Something isn't working
Milestone

Comments

@plesiecki
Copy link

Hello,

After upgrading to 0.0.23 this plugin fails with node 5.
It looks like this:

postcss-at-rules-variables/lib/index.js:35
        rule.each(({ prop, value }) => {
                   ^
SyntaxError: Unexpected token {

It seems babel configuration miss babel-plugin-transform-es2015-destructuring.

Maybe it works with latest node6 - I'm not sure.

Cheers

@Scrum Scrum self-assigned this Jun 22, 2016
@Scrum
Copy link
Owner

Scrum commented Jun 22, 2016

@plesiecki Hi, write you OS and full version node 5.
i have tests which passed on node 4,5,6.
maybe you need reinstall all node modules.

@plesiecki
Copy link
Author

rm -rf node_modules && npm i didn't help. After further investigation I noticed that transpiled version of master (after npm run build) and installed module from npm registry are different.

// lib/index.js:35 built locally
rule.each(_ref => {
  let prop = _ref.prop;
  let value = _ref.value;

  propertys[prop] = value;
});
// lib/index.js:35 installed from npm registry
rule.each(({ prop, value }) => {
    propertys[prop] = value;
});

Your test are green because ava transpile your code for you

@Scrum Scrum added type: bug Something isn't working update labels Jun 22, 2016
@Scrum Scrum added this to the 0.0.24 milestone Jun 22, 2016
@Scrum
Copy link
Owner

Scrum commented Jun 22, 2016

@plesiecki

After further investigation I noticed that transpiled version of master (after npm run build) and installed module from npm registry are different.

I transpiling and publish from node 6, this is a my stupid mistake.

Your test are green because ava transpile your code for you

You are absolutely right !

P.S Thank you for your feedback, it is very important to me and my product :)

@Scrum Scrum closed this as completed in 6d38bde Jun 22, 2016
@Scrum
Copy link
Owner

Scrum commented Jun 22, 2016

@plesiecki fix and publish.

@plesiecki
Copy link
Author

Let me know when you publish new version

@Scrum
Copy link
Owner

Scrum commented Jun 22, 2016

@plesiecki now last version 0.0.24

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants