Parcel: Path must be a string. Received null

Created on 11 Jul 2018  路  5Comments  路  Source: parcel-bundler/parcel

馃悰 bug report

Fresh project with blank HTML5 boilerplate index file will not build.

馃帥 Configuration (.babelrc, package.json, cli command)

No configuration.

馃 Expected Behavior

It should build and show the preview in the browser.

馃槸 Current Behavior


lawrence@LIGHTNING:/mnt/c/Users/Lawrence/Documents/dev/sandbox/instagram-api$ parcel index.html Server running at http://localhost:1234 馃毃 /mnt/c/Users/Lawrence/Documents/dev/sandbox/instagram-api/index.html: Path must be a string. Received null at assertPath (path.js:28:11) at Object.join (path.js:1236:7) at module.exports (/usr/lib/node_modules/parcel-bundler/src/utils/urlJoin.js:11:29) at HTMLAsset.processSingleDependency (/usr/lib/node_modules/parcel-bundler/src/assets/HTMLAsset.js:91:19) at ast.walk.node (/usr/lib/node_modules/parcel-bundler/src/assets/HTMLAsset.js:138:43) at traverse (/usr/lib/node_modules/parcel-bundler/node_modules/posthtml/lib/api.js:105:26) at traverse (/usr/lib/node_modules/parcel-bundler/node_modules/posthtml/lib/api.js:111:5) at traverse (/usr/lib/node_modules/parcel-bundler/node_modules/posthtml/lib/api.js:105:17) at traverse (/usr/lib/node_modules/parcel-bundler/node_modules/posthtml/lib/api.js:111:5) at traverse (/usr/lib/node_modules/parcel-bundler/node_modules/posthtml/lib/api.js:105:17)

馃拋 Possible Solution

馃敠 Context

This is the first time using parcel. There is no context. It should work.

馃捇 Code Sample

index.html

馃實 Your Environment

| Software | Version(s) |
| ---------------- | ---------- |
| Parcel | Latest
| Node | 8.11.1
| npm/Yarn | 5.6.0
| Operating System | Ubuntu / WSL

Question

Most helpful comment

In your html you have an empty link tag that should probably be requiring your css?

<link rel="stylesheet" href="">

But you're definitely right that we need to work on creating more detailed and explanatory error messages.

All 5 comments

In your html you have an empty link tag that should probably be requiring your css?

<link rel="stylesheet" href="">

But you're definitely right that we need to work on creating more detailed and explanatory error messages.

Theres also this line:
<!--[if gt IE 8]><!-->

@DeMoorJasper Your commentary was helpful, I generated my index.html file with boilerplate, then I had this: <link rel="stylesheet" href="">! I removed it then so it works fine. Thanks

Parcel doesn't seem to crash anymore with the provided html file.

Placing a <img src=""> returns the same error (took me 20 min to figure out that)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Clickys picture Clickys  路  61Comments

v0idifier picture v0idifier  路  51Comments

shiloa picture shiloa  路  39Comments

jpsc picture jpsc  路  81Comments

mcfarljw picture mcfarljw  路  46Comments