sleexyz / dir-loader

Dynamically require a directory in Webpack. Use Webpack as a CMS!
13 stars 5 forks source link

Unexpected token: name (Symbol) #18

Open trivektor opened 7 years ago

trivektor commented 7 years ago

When I ran npm run build I got this error

SyntaxError: Unexpected token: name (Symbol)

which seems to be caused by

https://github.com/sleexyz/dir-loader/blob/master/lib/loadDirectory.js#L24

sleexyz commented 7 years ago

I'll look into this sometime this month; I haven't touched this project in at least a year :)

sleexyz commented 7 years ago

The issue is that Symbol is an es6 feature. @trivektor Are you running a node version that supports es6?

trivektor commented 7 years ago

@sleexyz I'm running Node 5.6.0 so yes I guess. Which version of Node were you using while developing this package?

sleexyz commented 7 years ago

im running 6.8.0; i think all you need > 6

On Tue, Dec 20, 2016, 1:37 AM Tri Vuong notifications@github.com wrote:

@sleexyz https://github.com/sleexyz I'm running Node 5.6.0 so yes I guess. Which version of Node were you using while developing this package?

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/sleexyz/dir-loader/issues/18#issuecomment-268167316, or mute the thread https://github.com/notifications/unsubscribe-auth/ABb5UUKurYWWnHa3QkAqkivvYZzC_IuNks5rJ3etgaJpZM4LFI-m .