question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Basic .parcelrc crashes Parcel

See original GitHub issue

Using the following .parcelrc crashes the latest alpha release 2.0.0-alpha.2.1.

{
  "extends": "@parcel/config-default",
  "transforms": {
    "*.js": ["@parcel/transformer-babel"]
  }
}

Error thrown:

🚨 The expression evaluated to a falsy value:

  (0, _assert.default)(typeof v === 'string')


  (0, _assert.default)(typeof v === 'string')

    at assertString (/home/romu/tmp/parcel-ssr/node_modules/@parcel/scope-hoisting/lib/link.js:47:23)
    at /home/romu/tmp/parcel-ssr/node_modules/@parcel/scope-hoisting/lib/link.js:89:16
    at enter (/home/romu/tmp/parcel-ssr/node_modules/@parcel/core/lib/Graph.js:475:16)
    at enter (/home/romu/tmp/parcel-ssr/node_modules/@parcel/core/lib/Graph.js:475:16)
    at enter (/home/romu/tmp/parcel-ssr/node_modules/@parcel/core/lib/Graph.js:475:16)
    at walk (/home/romu/tmp/parcel-ssr/node_modules/@parcel/core/lib/Graph.js:310:26)
    at walk (/home/romu/tmp/parcel-ssr/node_modules/@parcel/core/lib/Graph.js:331:22)
    at Graph.dfs (/home/romu/tmp/parcel-ssr/node_modules/@parcel/core/lib/Graph.js:355:12)
    at Graph.traverse (/home/romu/tmp/parcel-ssr/node_modules/@parcel/core/lib/Graph.js:257:17)
    at Graph.filteredTraverse (/home/romu/tmp/parcel-ssr/node_modules/@parcel/core/lib/Graph.js:265:17)

Repro: https://github.com/brillout/parcel-ssr

Context: I want to build an SSR tool on top of Parcel.

Env: Linux / parcel@2.0.0-alpha.2.1 / node@12.2.0 / yarn@1.19.1

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:21 (3 by maintainers)

github_iconTop GitHub Comments

5reactions
Cristy94commented, Mar 20, 2020

Using scopehoisting requires that “@parcel/transformer-js” transforms the assets (and set some metadata). The only thing we can do here is give a better error message. You should use a ˚.parcelrc` like this one:

{
  "extends": "@parcel/config-default",
  "transforms": {
    "*.js": ["@parcel/transformer-babel", "@parcel/transformer-js"]
  }
}

I too got the error The expression evaluated to a falsy value and tried to add this as my .parcelrc, but it doesn’t work:

{ [Error: Invalid Parcel Config]
  diagnostics:
   [ { message: 'Invalid Parcel Config',
       origin: '@parcel/core',
       filePath: '.parcelrc',
       language: 'json',
       codeFrame: [Object] } ],
  name: 'Error' }
3reactions
Krizzcommented, May 27, 2021

For me, it seems like updating from beta-3.1 to the latest nightly (2.0.0-nightly.688) fixed the issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Parcel
parcelrc is a simple JSON-based config format that uses globs to match your source files to build pipelines. You can extend the default...
Read more >
Parcel Bundler crashes while bundling PNG - Stack Overflow
I am using Parcel Bundler (version 2.3.1) for HMR and bundling. The dev server works fine but when bundling for production the process ......
Read more >
just_there/parcel - Gitee
Don't crash on `. ... The Parcel CLI is built into the main parcel package. ... with your files or the Parcel asset...
Read more >
Parcel unexpected token
how does crash gambling work privacy panel for deck top 10 female twitch streamers zillow peachtree ... 唉! jquery jsp 文件 里还引入了一个base.jsp文件。
Read more >
Crash when selecting parcels in Civil 3D
Civil 3D will crash when attempting to select one or multiple parcels. Causes: Outdated graphics card drivers. Solution: Try the following:.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found