catamphetamine / react-phone-number-input

React component for international phone number input
http://catamphetamine.gitlab.io/react-phone-number-input/
MIT License
933 stars 196 forks source link

(Parcel) ReferenceError: parser is not defined #302

Open kahurangitama opened 5 years ago

kahurangitama commented 5 years ago

I has "react-phone-number-input": "^2.3.22" which is works well. After update CircleCI starts to produce broken builds:

Screen Shot 2019-12-03 at 17 02 49
kahurangitama commented 5 years ago

parcel-bundler@1.12.3

kahurangitama commented 5 years ago

Temporarily set npm version hard to "react-phone-number-input": "2.3.22"

catamphetamine commented 5 years ago

I looked at the sources at path ./source/PhoneInput.js -> ./source/InputSmart.js -> input-format/source/template parser.js -> input-format/source/helpers.js, and there's no parser variable name. Perhaps there's something with your node_modules.

kahurangitama commented 5 years ago

I have one suggestion. Maybe bug is on Parcel side and it transform a filename template parser.js incorrectly. Like space in filename is confusing, I wonder how this files was called before?

catamphetamine commented 5 years ago

It was called the same. If parcel has issues with whitespace then you could create an issue in their repo.

On Thu, 5 Dec 2019 at 20:06, Pavlo notifications@github.com wrote:

I have one suggestion. Maybe bug is on Parcel side and it transform a filename template parser.js incorrectly. Like space in filename is confusing, I wonder how this files was called before?

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/catamphetamine/react-phone-number-input/issues/302?email_source=notifications&email_token=AADUP34T2DGQHRRLQX2UV23QXEYHXA5CNFSM4JUZU242YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGBNDZI#issuecomment-562221541, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADUP3Z6K2TVUPFAUPNAVNLQXEYHXANCNFSM4JUZU24Q .

swba commented 4 years ago

It's Parcel's issue, it incorrectly detects source maps. See https://github.com/parcel-bundler/parcel/issues/2408 for example.

For time being, one can use --no-source-maps flag to turn source maps off (see https://github.com/parcel-bundler/parcel#--no-source-maps).