Parcel: Cannot set property 'fileName' of undefined

Created on 5 Jun 2019  ·  6Comments  ·  Source: parcel-bundler/parcel

Cannot set property 'fileName' of undefined
Console logs:

Server running at http://localhost:37557 - configured port 1234 could not be used.
⠙ Building landing.html...addDependencyTo is deprecated in favor of
result.messages.dependency; posthtml-loader >= v1.0.1 will
automatically add your imported files to webpack's file watcher.
addDependencyTo is deprecated in favor of
result.messages.dependency; posthtml-loader >= v1.0.1 will
automatically add your imported files to webpack's file watcher.
🚨  /src/pages/landing.html: Cannot set property 'fileName' of undefined
    at Pipeline.process (/node_modules/parcel-bundler/src/Pipeline.js:30:22)
addDependencyTo is deprecated in favor of
result.messages.dependency; posthtml-loader >= v1.0.1 will
automatically add your imported files to webpack's file watcher.
addDependencyTo is deprecated in favor of
result.messages.dependency; posthtml-loader >= v1.0.1 will
automatically add your imported files to webpack's file watcher.

1559749197535.zip

Bug Stale

Most helpful comment

This is happening for me whenever there's _any_ error in the pipeline, such as a posthtml error; Parcel tries to report the error, but there's an error in the error reporting function itself.

https://github.com/parcel-bundler/parcel/blob/96119be782d9d551f73b77e06ab25067c7073344/packages/core/parcel-bundler/src/Pipeline.js#L30

This is making debugging issues a major pain; I'm having to manually add console.error(err) before the erroring line in Pipeline.js order to get a sense of what the error _actually_ is.

All 6 comments

This is happening for me whenever there's _any_ error in the pipeline, such as a posthtml error; Parcel tries to report the error, but there's an error in the error reporting function itself.

https://github.com/parcel-bundler/parcel/blob/96119be782d9d551f73b77e06ab25067c7073344/packages/core/parcel-bundler/src/Pipeline.js#L30

This is making debugging issues a major pain; I'm having to manually add console.error(err) before the erroring line in Pipeline.js order to get a sense of what the error _actually_ is.

I have this issue too.
@w-biggs thanks for the tip, it helped me find out what the underlying issue is.

In my case, I set wrong file name in index.html.

bot added the Stale label

giphy

also very much interested in this

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

philipodev picture philipodev  ·  3Comments

donaldallen picture donaldallen  ·  3Comments

humphd picture humphd  ·  3Comments

Niggler picture Niggler  ·  3Comments

dotdash picture dotdash  ·  3Comments