Parcel: Upgrading to 1.7.0 no longer handles nested entry points

Created on 31 Mar 2018  ยท  3Comments  ยท  Source: parcel-bundler/parcel

Choose one: is this a ๐Ÿ› bug report or ๐Ÿ™‹ feature request?

Bug report

๐ŸŽ› Configuration (.babelrc, package.json, cli command)

The given command no longer works:

parcel serve --open src/index.html

๐Ÿค” Expected Behavior

The following command:

parcel serve --open src/index.html

should work exactly like just like it used to:

parcel serve --open index.html

๐Ÿ˜ฏ Current Behavior

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>

๐Ÿ’ Possible Solution

I don't know. I would need to look into changes dealing with how parcel resolves files.

๐Ÿ”ฆ Context

๐Ÿ’ป Code Sample

๐ŸŒ Your Environment

| Software | Version(s) |
| ---------------- | ---------- |
| Parcel | 1.7.0
| Node | 8.10.0
| npm/Yarn | 1.5.1
| Operating System | Mac OS X

Most helpful comment

Seems to be resolved than probably has to do with the fact that --open now has an optional parameter

All 3 comments

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

Was this page helpful?
0 / 5 - 0 ratings