Abolfazl2647 / Rezvani-datepicker

Persian Date Picker for React Js developers
10 stars 2 forks source link

Unexpected identifier #1

Closed afsanefdaa closed 5 years ago

afsanefdaa commented 5 years ago

I've followed the instruction but faced this error while I was trying tonpm start :

Unexpected identifier

I:\Next\hello-next\node_modules\rezvani-datepicker\lib\helper.js:1
(function (exports, require, module, __filename, __dirname) { import moment from 'jalali-moment';
                                                                     ^^^^^^

SyntaxError: Unexpected identifier
    at new Script (vm.js:79:7)
    at createScript (vm.js:251:10)
    at Object.runInThisContext (vm.js:303:10)
    at Module._compile (internal/modules/cjs/loader.js:657:28)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:22:18)
    at Object.<anonymous> (I:\Next\hello-next\node_modules\rezvani-datepicker\lib\rezvani-datepicker.js:15:15)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)

Do you know why is that ?

Abolfazl2647 commented 5 years ago

sorry about that i forgot to add "Jalali-moment" as dependencies i fixed this issue by adding "Jalali-moment" in package.json file.