Choose one: is this a ๐ bug report or ๐ feature request?
Bug report
The given command no longer works:
parcel serve --open src/index.html
The following command:
parcel serve --open src/index.html
should work exactly like just like it used to:
parcel serve --open index.html
The current behavior prints out a stack track like the following when the above command is run:
$ parcel serve --open src/index.html
Server running at http://localhost:1234
โณ Building...
Unexpected error while opening in browser: src/index.html
Error: Exited with code 1
at ChildProcess.cp.once.code (/Users/me/.config/yarn/global/node_modules/opn/index.js:84:13)
at Object.onceWrapper (events.js:317:30)
at emitTwo (events.js:126:13)
at ChildProcess.emit (events.js:214:7)
at maybeClose (internal/child_process.js:925:16)
at Socket.stream.socket.on (internal/child_process.js:346:11)
at emitOne (events.js:116:13)
at Socket.emit (events.js:211:7)
๐จ Cannot find module '/Users/me/Desktop/repos/test/test' from '/Users/me/Desktop/repos/parcel-example'
at Resolver.resolve (/Users/me/.config/yarn/global/node_modules/parcel-bundler/src/Resolver.js:76:17)
at <anonymous>
I don't know. I would need to look into changes dealing with how parcel resolves files.
| Software | Version(s) |
| ---------------- | ---------- |
| Parcel | 1.7.0
| Node | 8.10.0
| npm/Yarn | 1.5.1
| Operating System | Mac OS X
Perhaps try parcel serve src/index.html --open
@DeMoorJasper I also experienced this and found that
parcel --open src/index.html successfully opened browser with 1.6.2, and did not with 1.7.0.
parcel src/index.html --open successfully opened browser with 1.7.0.
Thanks for the heads up.
Seems to be resolved than probably has to do with the fact that --open now has an optional parameter
Most helpful comment
Seems to be resolved than probably has to do with the fact that
--opennow has an optional parameter