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 read property 'length' of undefined #2957

Closed
oimmc opened this issue Apr 25, 2019 · 11 comments
Closed

Cannot read property 'length' of undefined #2957

oimmc opened this issue Apr 25, 2019 · 11 comments

Comments

@oimmc
Copy link

oimmc commented Apr 25, 2019

Cannot read property 'length' of undefined
at lineCounter (/Users/www/repository/parcel-demo/node_modules/_parcel-bundler@1.12.3@parcel-bundler/src/utils/lineCounter.js:3:30)
at JSPackager.writeModule (/Users/www/repository/parcel-demo/node_modules/_parcel-bundler@1.12.3@parcel-bundler/src/packagers/JSPackager.js:127:60)
at

@quasicomputational
Copy link

Looks very much like #1158.

@oimmc
Copy link
Author

oimmc commented Apr 25, 2019

I deleted node _ module, redownloaded it, and reported it wrong

@cloudever
Copy link

cloudever commented Apr 25, 2019

Same issue. I've found some thing

image

v1.12.3
Using typescript with lerna/yarn workspaces, so node_modules hoisted in the root directory

@joshuazmiller
Copy link

FYI to solve I deleted .cache directory. Ran parcel src/index.html -t node, stopped running, and then ran my regular parcel src/index.html.

@oimmc
Copy link
Author

oimmc commented Apr 26, 2019

@joshuazmiller you are right.

@oimmc oimmc closed this as completed Apr 26, 2019
@Shuunen
Copy link

Shuunen commented May 13, 2019

Deleting .cache folder worked on my side, without -t node restart thing

Thanks @joshuazmiller 👍

@hmmhmmhm
Copy link

@joshuazmiller thanks! you saved me on 2020!

@tiennsloit
Copy link

Deleting .cache folder also worked for me, no need -t node. Thanks so much @joshuazmiller

@lildev
Copy link

lildev commented Jan 29, 2020

I just installed 1.12.3 version. It worked for me. yarn add parcel-bundler@1.12.3

@gauravrajdeo
Copy link

Deleting .cache folder worked for me too. Thanks, @joshuazmiller

@BogdanConstantinDEV
Copy link

Deleting .cache folder worked on my side, without -t node restart thing

Thanks @joshuazmiller 👍

This worked for me too

mchaoTechtonic added a commit to mchaoTechtonic/javascript-promises-async-await that referenced this issue Oct 28, 2020
-Read someone's tip here parcel-bundler/parcel#2957 (comment)
-I deleted package-lock.json, node_modules folder, and .cache folder
-Then I ran `npm install` which went fine
-Then `npm start` didn't show any errors. I could see the app working in the browser console!
milafrerichs added a commit to OpenUpSA/wazimap-ng-ui that referenced this issue Mar 17, 2021
I ran into this a couple of times already.
reference here: parcel-bundler/parcel#2957
milafrerichs added a commit to OpenUpSA/wazimap-ng-ui that referenced this issue Apr 9, 2021
I ran into this a couple of times already.
reference here: parcel-bundler/parcel#2957
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants