Preact-cli: Polluted error report

Created on 23 May 2017  路  3Comments  路  Source: preactjs/preact-cli

This is how the output error of a wrong import path looks like

./~/babel-loader/lib?{"cacheDirectory":true,"plugins":["/home/khoa/web/tmp/b/~/babel-plugin-transform-object-assign/lib/index.js","/home/khoa/web/tmp/b/~/babel-plugin-transform-decorators-legacy/lib/index.js","/home/khoa/web/tmp/b/~/babel-plugin-transform-react-constant-elements/lib/index.js","/home/khoa/web/tmp/b/~/babel-plugin-transform-react-remove-prop-types/lib/index.js",["/home/khoa/web/tmp/b/~/babel-plugin-transform-react-jsx/lib/index.js",{"pragma":"h"}],["/home/khoa/web/tmp/b/~/babel-plugin-jsx-pragmatic/jsx-pragmatic.js",{"module":"preact","export":"h","import":"h"}]],"presets":[["/home/khoa/web/tmp/b/~/babel-preset-env/lib/index.js",{"loose":true,"modules":false,"uglify":true,"browsers":["> 1%","Last 2 versions","IE >= 9"],"exclude":["transform-regenerator","transform-es2015-typeof-symbol"]}],"/home/khoa/web/tmp/b/~/babel-preset-stage-0/lib/index.js"]}!./routes/home/index.js
Module not found: Error: Can't resolve '../../this-component-should-be-load-async' in '/home/khoa/web/tmp/b/routes/home'
resolve '../../this-component-should-be-load-async' in '/home/khoa/web/tmp/b/routes/home'
  using description file: /home/khoa/web/tmp/b/package.json (relative path: ./routes/home)
    Field 'browser' doesn't contain a valid alias configuration
  after using description file: /home/khoa/web/tmp/b/package.json (relative path: ./routes/home)
    using description file: /home/khoa/web/tmp/b/package.json (relative path: ./this-component-should-be-load-async)
      as directory
        /home/khoa/web/tmp/b/this-component-should-be-load-async doesn't exist
      no extension
        Field 'browser' doesn't contain a valid alias configuration
        /home/khoa/web/tmp/b/this-component-should-be-load-async doesn't exist
      .js
        Field 'browser' doesn't contain a valid alias configuration
        /home/khoa/web/tmp/b/this-component-should-be-load-async.js doesn't exist
      .jsx
        Field 'browser' doesn't contain a valid alias configuration
        /home/khoa/web/tmp/b/this-component-should-be-load-async.jsx doesn't exist
      .ts
        Field 'browser' doesn't contain a valid alias configuration
        /home/khoa/web/tmp/b/this-component-should-be-load-async.ts doesn't exist
      .tsx
        Field 'browser' doesn't contain a valid alias configuration
        /home/khoa/web/tmp/b/this-component-should-be-load-async.tsx doesn't exist
      .json
        Field 'browser' doesn't contain a valid alias configuration
        /home/khoa/web/tmp/b/this-component-should-be-load-async.json doesn't exist
      .less
        Field 'browser' doesn't contain a valid alias configuration
        /home/khoa/web/tmp/b/this-component-should-be-load-async.less doesn't exist
      .scss
        Field 'browser' doesn't contain a valid alias configuration
        /home/khoa/web/tmp/b/this-component-should-be-load-async.scss doesn't exist
      .sass
        Field 'browser' doesn't contain a valid alias configuration
        /home/khoa/web/tmp/b/this-component-should-be-load-async.sass doesn't exist
      .css
        Field 'browser' doesn't contain a valid alias configuration
        /home/khoa/web/tmp/b/this-component-should-be-load-async.css doesn't exist
[/home/khoa/web/tmp/b/this-component-should-be-load-async]
[/home/khoa/web/tmp/b/this-component-should-be-load-async]
[/home/khoa/web/tmp/b/this-component-should-be-load-async.js]
[/home/khoa/web/tmp/b/this-component-should-be-load-async.jsx]
[/home/khoa/web/tmp/b/this-component-should-be-load-async.ts]
[/home/khoa/web/tmp/b/this-component-should-be-load-async.tsx]
[/home/khoa/web/tmp/b/this-component-should-be-load-async.json]
[/home/khoa/web/tmp/b/this-component-should-be-load-async.less]
[/home/khoa/web/tmp/b/this-component-should-be-load-async.scss]
[/home/khoa/web/tmp/b/this-component-should-be-load-async.sass]
[/home/khoa/web/tmp/b/this-component-should-be-load-async.css]
 @ ./~/babel-loader/lib?{"cacheDirectory":true,"plugins":["/home/khoa/web/tmp/b/~/babel-plugin-transform-object-assign/lib/index.js","/home/khoa/web/tmp/b/~/babel-plugin-transform-decorators-legacy/lib/index.js","/home/khoa/web/tmp/b/~/babel-plugin-transform-react-constant-elements/lib/index.js","/home/khoa/web/tmp/b/~/babel-plugin-transform-react-remove-prop-types/lib/index.js",["/home/khoa/web/tmp/b/~/babel-plugin-transform-react-jsx/lib/index.js",{"pragma":"h"}],["/home/khoa/web/tmp/b/~/babel-plugin-jsx-pragmatic/jsx-pragmatic.js",{"module":"preact","export":"h","import":"h"}]],"presets":[["/home/khoa/web/tmp/b/~/babel-preset-env/lib/index.js",{"loose":true,"modules":false,"uglify":true,"browsers":["> 1%","Last 2 versions","IE >= 9"],"exclude":["transform-regenerator","transform-es2015-typeof-symbol"]}],"/home/khoa/web/tmp/b/~/babel-preset-stage-0/lib/index.js"]}!./routes/home/index.js 11:0-61
 @ ./routes/home/index.js
 @ ./index.js
 @ ./~/preact-cli/lib/lib/entry.js
 @ multi ./~/preact-cli/lib/lib/entry webpack-dev-server/client?http://0.0.0.0:8080/ webpack/hot/dev-server?http://0.0.0.0:8080/

The only interested part in the error is this:

Module not found: Error: Can't resolve '../../this-component-should-be-load-async' in '/home/khoa/web/tmp/b/routes/home'

Hope you can fix this.

enhancement

Most helpful comment

Oh yeah, totally agree. I have a bunch of output filters I can add that make these actually quite beautiful.

Here's an example video of the output:
https://twitter.com/_developit/status/759178282570887168/

All 3 comments

Oh yeah, totally agree. I have a bunch of output filters I can add that make these actually quite beautiful.

Here's an example video of the output:
https://twitter.com/_developit/status/759178282570887168/

would love to see this as well!

fixed in #206

Was this page helpful?
0 / 5 - 0 ratings