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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot read property 'port' of null #4

Closed
heyMP opened this issue Dec 5, 2017 · 15 comments
Closed

Cannot read property 'port' of null #4

heyMP opened this issue Dec 5, 2017 · 15 comments

Comments

@heyMP
Copy link

heyMP commented Dec 5, 2017

I installed parcel-bundler globally. When I run parcel index.html I get the following error.

Server running at http://localhost:1234
馃毃  Cannot read property 'port' of null
    at new HMRServer (/Users/scienceonlineed/.config/yarn/global/node_modules/parcel-bundler/lib/HMRServer.js:8:43)
    at Bundler.start (/Users/scienceonlineed/.config/yarn/global/node_modules/parcel-bundler/lib/Bundler.js:177:18)
    at /Users/scienceonlineed/.config/yarn/global/node_modules/parcel-bundler/lib/Bundler.js:130:15
    at next (native)
    at step (/Users/scienceonlineed/.config/yarn/global/node_modules/parcel-bundler/lib/Bundler.js:3:191)
    at /Users/scienceonlineed/.config/yarn/global/node_modules/parcel-bundler/lib/Bundler.js:3:437
    at /Users/scienceonlineed/.config/yarn/global/node_modules/parcel-bundler/lib/Bundler.js:3:99
    at Bundler.bundle (/Users/scienceonlineed/.config/yarn/global/node_modules/parcel-bundler/lib/Bundler.js:160:7)
    at Bundler.serve (/Users/scienceonlineed/.config/yarn/global/node_modules/parcel-bundler/lib/Bundler.js:615:10)
    at Command.bundle (/Users/scienceonlineed/.config/yarn/global/node_modules/parcel-bundler/bin/cli.js:67:13)

Tested in the following environments with the same result:

Mac

Node version: v6.11.5
Mac version: 10.12.5

Dockerfile:

FROM node:6.11.4
RUN npm install -g parcel-bundler
USER node
WORKDIR /home/node/html
CMD [ "parcel", "index.html" ]
EXPOSE 1234
@devongovett
Copy link
Member

hmm, could be a node v6 thing... seems to work for me on v8.

@TheLarkInn
Copy link

@devongovett node 6 being current LTS, you'd probably want to at least add the minimum engines value for so that it's obvious for people that they can't use it. Just 2 cents :-D

@jpsc
Copy link

jpsc commented Dec 5, 2017

@TheLarkInn you mean 8 right?
@devongovett why you offer a babel-ed version of Bundler for 6? Why not only support 8 with only async ?

@devongovett
Copy link
Member

it should be supported, just a bug. Someone want to look into what the API difference is? :D

@bigtunacan
Copy link

Same issue running node v6.8.1 on Mac 10.12.6

@ameriania
Copy link

the same problem in node version v6.9.5

@devongovett
Copy link
Member

Should be fixed by bab5ff4. Will go out in the next release.

@devongovett
Copy link
Member

Released in v1.0.2.

@danielcaldas
Copy link

Is this fixed? I installed version v1.1.0 and the problem still exists for node version v6.9.5, I then upgraded node to v8.9.0 and it started working as you can see in the picture below.

screen shot 2017-12-09 at 16 29 14

@davidnagli
Copy link
Contributor

@danielcaldas What version of Parcel are you using?

@danielcaldas
Copy link

danielcaldas commented Dec 9, 2017

I wasn't clear above. I installed parcel v1.1.0.

@davidnagli
Copy link
Contributor

Whoops sorry that was a dumb question 馃槀

Can you please send a zip file with your setup or post an example repo so I can try to reproduce the issue?

@davidnagli
Copy link
Contributor

davidnagli commented Dec 10, 2017

screen shot 2017-12-09 at 8 35 32 pm
I ran it on a minimal example I made and it worked perfectly (using Node v6.9.5)

@danielcaldas
Copy link

Hey @davidnagli sorry for the false alarm was running parcel with a global version (v1.0.1)! Tried with parcel inside node_modules/bin and it's working fine with node v6.9.5! Thanks

screen shot 2017-12-10 at 17 41 22

@davidnagli
Copy link
Contributor

yay! Glad you got it to work :)

shawwn pushed a commit to shawwn/parcel that referenced this issue Jan 5, 2018
treshugart referenced this issue in atlassian/parcel Sep 26, 2019
Stop removing subgraphs at bundle boundaries

Approved-by: Maia Teegarden
AGawrys pushed a commit that referenced this issue Dec 7, 2020
Merge  v2 2020-10-21

Approved-by: Maia Teegarden
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants