parcel: Cannot read property 'port' of null
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
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 5
- Comments: 15 (8 by maintainers)
Commits related to this issue
- Merge pull request #4 from parcel-bundler/master Add all new commits — committed to shawwn/parcel by deleted user 7 years ago
- Merged in wbinnssmith/stop-removing-graph (pull request #4) Stop removing subgraphs at bundle boundaries Approved-by: Maia Teegarden — committed to atlassian/parcel by deleted user 5 years ago
- Merged in wbinnssmith/v2-10202021 (pull request #4) Merge v2 2020-10-21 Approved-by: Maia Teegarden — committed to parcel-bundler/parcel by deleted user 4 years ago
Should be fixed by bab5ff459efd6452cc947b76de5d6465b5003ddb. Will go out in the next release.
yay! Glad you got it to work π
Hey @davidnagli sorry for the false alarm was running
parcel
with a global version (v1.0.1
)! Tried withparcel
insidenode_modules/bin
and itβs working fine with nodev6.9.5
! Thanks