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

Cannot build with webpack #53

Closed
safinn opened this issue May 8, 2017 · 2 comments
Closed

Cannot build with webpack #53

safinn opened this issue May 8, 2017 · 2 comments

Comments

@safinn
Copy link

safinn commented May 8, 2017

Im using this module in a react app and when trying to bundle the code with webpack in production mode I get an error due to this line:

const defaultPathMode = 0o0700;

with the text Invalid syntax. Should the value be a string (surrounded by quotes)?

@sindresorhus
Copy link
Member

sindresorhus commented May 8, 2017

That's a ES2015 octal literal. This module mainly targets Node.js, not the browser. It's up to you to transpile it with Babel if you want to use it in the browser. You can find a more detailed explanation here: sindresorhus/ama#446

@yeoman yeoman locked and limited conversation to collaborators May 8, 2017
@sindresorhus
Copy link
Member

In this case, the proper way would be to tell webpack to ignore it. See: sindresorhus/electron-store#3

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants