Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

Massive error message in development when unable to resolve a file #875

Closed
mrwillis opened this issue May 16, 2018 · 3 comments · Fixed by #936
Closed

Massive error message in development when unable to resolve a file #875

mrwillis opened this issue May 16, 2018 · 3 comments · Fixed by #936
Assignees
Labels

Comments

@mrwillis
Copy link

mrwillis commented May 16, 2018

Bug or issue?

Please try to answer the following questions:

  • What version of Neutrino are you using? 8.2.3
  • Are you trying to use any presets? If so, which ones, and what versions? "neutrinojs/react": "^8.2.3",
  • Are you using the Yarn client or the npm client? What version? 1.6.0
  • What version of Node.js are you using? 10.0.0
  • What operating system are you using? Ubuntu 16 x64
  • What did you do? neutrino start when there is an unresolved module in a file
  • What did you expect to happen? A reasonable error message
  • What actually happened, contrary to your expectations? I get a massive error message

Occasionally I accidentally import something from the wrong file after some refactoring. Happens. When I run neutrino start, I would expect it to tell me that a certain thing can't be found, but I get a HUGE error message which tells me essentially the same thing. It's slightly amusing but can be annoying at times. I find this typically only happens when imports cannot be found. Example:

julian@wilson:~/Desktop/my-app/my-app-client$ yarn run start
yarn run v1.6.0
(node:18904) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
$ neutrino start
✔ Development server running on: http://localhost:5000
✔ Build completed

And the big one:

ERROR in ./src/bundles/home/components/Layout.jsx
Module not found: Error: Can't resolve 'bundles/home/components/CoinPageHeader' in '/home/julian/Desktop/my-app/my-app-client/src/bundles/home/components'
resolve 'bundles/home/components/CoinPageHeader' in '/home/julian/Desktop/my-app/my-app-client/src/bundles/home/components'
  Parsed request is a module
  using description file: /home/julian/Desktop/my-app/my-app-client/package.json (relative path: ./src/bundles/home/components)
    Field 'browser' doesn't contain a valid alias configuration
  after using description file: /home/julian/Desktop/my-app/my-app-client/package.json (relative path: ./src/bundles/home/components)
    resolve as module
      /home/julian/Desktop/my-app/my-app-client/src/bundles/home/components/node_modules doesn't exist or is not a directory
      /home/julian/Desktop/my-app/my-app-client/src/bundles/home/node_modules doesn't exist or is not a directory
      /home/julian/Desktop/my-app/my-app-client/src/bundles/node_modules doesn't exist or is not a directory
      /home/julian/Desktop/my-app/my-app-client/src/node_modules doesn't exist or is not a directory
      /home/julian/Desktop/my-app/node_modules doesn't exist or is not a directory
      /home/julian/Desktop/node_modules doesn't exist or is not a directory
      /home/julian/node_modules doesn't exist or is not a directory
      /home/node_modules doesn't exist or is not a directory
      /node_modules doesn't exist or is not a directory
      looking for modules in /home/julian/Desktop/my-app/my-app-client/node_modules
        using description file: /home/julian/Desktop/my-app/my-app-client/package.json (relative path: ./node_modules)
          Field 'browser' doesn't contain a valid alias configuration
        after using description file: /home/julian/Desktop/my-app/my-app-client/package.json (relative path: ./node_modules)
          using description file: /home/julian/Desktop/my-app/my-app-client/package.json (relative path: ./node_modules/bundles/home/components/CoinPageHeader)
            no extension
              Field 'browser' doesn't contain a valid alias configuration
              /home/julian/Desktop/my-app/my-app-client/node_modules/bundles/home/components/CoinPageHeader doesn't exist
            .js
              Field 'browser' doesn't contain a valid alias configuration
              /home/julian/Desktop/my-app/my-app-client/node_modules/bundles/home/components/CoinPageHeader.js doesn't exist
            .jsx
              Field 'browser' doesn't contain a valid alias configuration
              /home/julian/Desktop/my-app/my-app-client/node_modules/bundles/home/components/CoinPageHeader.jsx doesn't exist
            .vue
              Field 'browser' doesn't contain a valid alias configuration
              /home/julian/Desktop/my-app/my-app-client/node_modules/bundles/home/components/CoinPageHeader.vue doesn't exist
            .ts
              Field 'browser' doesn't contain a valid alias configuration
              /home/julian/Desktop/my-app/my-app-client/node_modules/bundles/home/components/CoinPageHeader.ts doesn't exist
            .tsx
              Field 'browser' doesn't contain a valid alias configuration
              /home/julian/Desktop/my-app/my-app-client/node_modules/bundles/home/components/CoinPageHeader.tsx doesn't exist
            .mjs
              Field 'browser' doesn't contain a valid alias configuration
              /home/julian/Desktop/my-app/my-app-client/node_modules/bundles/home/components/CoinPageHeader.mjs doesn't exist
            .json
              Field 'browser' doesn't contain a valid alias configuration
              /home/julian/Desktop/my-app/my-app-client/node_modules/bundles/home/components/CoinPageHeader.json doesn't exist
            as directory
              /home/julian/Desktop/my-app/my-app-client/node_modules/bundles/home/components/CoinPageHeader doesn't exist
      looking for modules in /home/julian/Desktop/my-app/my-app-client/node_modules
        using description file: /home/julian/Desktop/my-app/my-app-client/package.json (relative path: ./node_modules)
          Field 'browser' doesn't contain a valid alias configuration
        after using description file: /home/julian/Desktop/my-app/my-app-client/package.json (relative path: ./node_modules)
          using description file: /home/julian/Desktop/my-app/my-app-client/package.json (relative path: ./node_modules/bundles/home/components/CoinPageHeader)
            no extension
              Field 'browser' doesn't contain a valid alias configuration
              /home/julian/Desktop/my-app/my-app-client/node_modules/bundles/home/components/CoinPageHeader doesn't exist
            .js
              Field 'browser' doesn't contain a valid alias configuration
              /home/julian/Desktop/my-app/my-app-client/node_modules/bundles/home/components/CoinPageHeader.js doesn't exist
            .jsx
              Field 'browser' doesn't contain a valid alias configuration
              /home/julian/Desktop/my-app/my-app-client/node_modules/bundles/home/components/CoinPageHeader.jsx doesn't exist
            .vue
              Field 'browser' doesn't contain a valid alias configuration
              /home/julian/Desktop/my-app/my-app-client/node_modules/bundles/home/components/CoinPageHeader.vue doesn't exist
            .ts
              Field 'browser' doesn't contain a valid alias configuration
              /home/julian/Desktop/my-app/my-app-client/node_modules/bundles/home/components/CoinPageHeader.ts doesn't exist
            .tsx
              Field 'browser' doesn't contain a valid alias configuration
              /home/julian/Desktop/my-app/my-app-client/node_modules/bundles/home/components/CoinPageHeader.tsx doesn't exist
            .mjs
              Field 'browser' doesn't contain a valid alias configuration
              /home/julian/Desktop/my-app/my-app-client/node_modules/bundles/home/components/CoinPageHeader.mjs doesn't exist
            .json
              Field 'browser' doesn't contain a valid alias configuration
              /home/julian/Desktop/my-app/my-app-client/node_modules/bundles/home/components/CoinPageHeader.json doesn't exist
            as directory
              /home/julian/Desktop/my-app/my-app-client/node_modules/bundles/home/components/CoinPageHeader doesn't exist
      looking for modules in /home/julian/Desktop/my-app/my-app-client/node_modules/@neutrinojs/web/node_modules
        using description file: /home/julian/Desktop/my-app/my-app-client/node_modules/@neutrinojs/web/package.json (relative path: ./node_modules)
          Field 'browser' doesn't contain a valid alias configuration
        after using description file: /home/julian/Desktop/my-app/my-app-client/node_modules/@neutrinojs/web/package.json (relative path: ./node_modules)
          using description file: /home/julian/Desktop/my-app/my-app-client/node_modules/@neutrinojs/web/package.json (relative path: ./node_modules/bundles/home/components/CoinPageHeader)
            no extension
              Field 'browser' doesn't contain a valid alias configuration
              /home/julian/Desktop/my-app/my-app-client/node_modules/@neutrinojs/web/node_modules/bundles/home/components/CoinPageHeader doesn't exist
            .js
              Field 'browser' doesn't contain a valid alias configuration
              /home/julian/Desktop/my-app/my-app-client/node_modules/@neutrinojs/web/node_modules/bundles/home/components/CoinPageHeader.js doesn't exist
            .jsx
              Field 'browser' doesn't contain a valid alias configuration
              /home/julian/Desktop/my-app/my-app-client/node_modules/@neutrinojs/web/node_modules/bundles/home/components/CoinPageHeader.jsx doesn't exist
            .vue
              Field 'browser' doesn't contain a valid alias configuration
              /home/julian/Desktop/my-app/my-app-client/node_modules/@neutrinojs/web/node_modules/bundles/home/components/CoinPageHeader.vue doesn't exist
            .ts
              Field 'browser' doesn't contain a valid alias configuration
              /home/julian/Desktop/my-app/my-app-client/node_modules/@neutrinojs/web/node_modules/bundles/home/components/CoinPageHeader.ts doesn't exist
            .tsx
              Field 'browser' doesn't contain a valid alias configuration
              /home/julian/Desktop/my-app/my-app-client/node_modules/@neutrinojs/web/node_modules/bundles/home/components/CoinPageHeader.tsx doesn't exist
            .mjs
              Field 'browser' doesn't contain a valid alias configuration
              /home/julian/Desktop/my-app/my-app-client/node_modules/@neutrinojs/web/node_modules/bundles/home/components/CoinPageHeader.mjs doesn't exist
            .json
              Field 'browser' doesn't contain a valid alias configuration
              /home/julian/Desktop/my-app/my-app-client/node_modules/@neutrinojs/web/node_modules/bundles/home/components/CoinPageHeader.json doesn't exist
            as directory
              /home/julian/Desktop/my-app/my-app-client/node_modules/@neutrinojs/web/node_modules/bundles/home/components/CoinPageHeader doesn't exist
      looking for modules in /home/julian/Desktop/my-app/my-app-client/node_modules/@neutrinojs/react/node_modules
        using description file: /home/julian/Desktop/my-app/my-app-client/node_modules/@neutrinojs/react/package.json (relative path: ./node_modules)
          Field 'browser' doesn't contain a valid alias configuration
        after using description file: /home/julian/Desktop/my-app/my-app-client/node_modules/@neutrinojs/react/package.json (relative path: ./node_modules)
          using description file: /home/julian/Desktop/my-app/my-app-client/node_modules/@neutrinojs/react/package.json (relative path: ./node_modules/bundles/home/components/CoinPageHeader)
            no extension
              Field 'browser' doesn't contain a valid alias configuration
              /home/julian/Desktop/my-app/my-app-client/node_modules/@neutrinojs/react/node_modules/bundles/home/components/CoinPageHeader doesn't exist
            .js
              Field 'browser' doesn't contain a valid alias configuration
              /home/julian/Desktop/my-app/my-app-client/node_modules/@neutrinojs/react/node_modules/bundles/home/components/CoinPageHeader.js doesn't exist
            .jsx
              Field 'browser' doesn't contain a valid alias configuration
              /home/julian/Desktop/my-app/my-app-client/node_modules/@neutrinojs/react/node_modules/bundles/home/components/CoinPageHeader.jsx doesn't exist
            .vue
              Field 'browser' doesn't contain a valid alias configuration
              /home/julian/Desktop/my-app/my-app-client/node_modules/@neutrinojs/react/node_modules/bundles/home/components/CoinPageHeader.vue doesn't exist
            .ts
              Field 'browser' doesn't contain a valid alias configuration
              /home/julian/Desktop/my-app/my-app-client/node_modules/@neutrinojs/react/node_modules/bundles/home/components/CoinPageHeader.ts doesn't exist
            .tsx
              Field 'browser' doesn't contain a valid alias configuration
              /home/julian/Desktop/my-app/my-app-client/node_modules/@neutrinojs/react/node_modules/bundles/home/components/CoinPageHeader.tsx doesn't exist
            .mjs
              Field 'browser' doesn't contain a valid alias configuration
              /home/julian/Desktop/my-app/my-app-client/node_modules/@neutrinojs/react/node_modules/bundles/home/components/CoinPageHeader.mjs doesn't exist
            .json
              Field 'browser' doesn't contain a valid alias configuration
              /home/julian/Desktop/my-app/my-app-client/node_modules/@neutrinojs/react/node_modules/bundles/home/components/CoinPageHeader.json doesn't exist
            as directory
              /home/julian/Desktop/my-app/my-app-client/node_modules/@neutrinojs/react/node_modules/bundles/home/components/CoinPageHeader doesn't exist
      looking for modules in /home/julian/Desktop/my-app/my-app-client/src
        using description file: /home/julian/Desktop/my-app/my-app-client/package.json (relative path: ./src)
          Field 'browser' doesn't contain a valid alias configuration
        after using description file: /home/julian/Desktop/my-app/my-app-client/package.json (relative path: ./src)
          using description file: /home/julian/Desktop/my-app/my-app-client/package.json (relative path: ./src/bundles/home/components/CoinPageHeader)
            no extension
              Field 'browser' doesn't contain a valid alias configuration
              /home/julian/Desktop/my-app/my-app-client/src/bundles/home/components/CoinPageHeader doesn't exist
            .js
              Field 'browser' doesn't contain a valid alias configuration
              /home/julian/Desktop/my-app/my-app-client/src/bundles/home/components/CoinPageHeader.js doesn't exist
            .jsx
              Field 'browser' doesn't contain a valid alias configuration
              /home/julian/Desktop/my-app/my-app-client/src/bundles/home/components/CoinPageHeader.jsx doesn't exist
            .vue
              Field 'browser' doesn't contain a valid alias configuration
              /home/julian/Desktop/my-app/my-app-client/src/bundles/home/components/CoinPageHeader.vue doesn't exist
            .ts
              Field 'browser' doesn't contain a valid alias configuration
              /home/julian/Desktop/my-app/my-app-client/src/bundles/home/components/CoinPageHeader.ts doesn't exist
            .tsx
              Field 'browser' doesn't contain a valid alias configuration
              /home/julian/Desktop/my-app/my-app-client/src/bundles/home/components/CoinPageHeader.tsx doesn't exist
            .mjs
              Field 'browser' doesn't contain a valid alias configuration
              /home/julian/Desktop/my-app/my-app-client/src/bundles/home/components/CoinPageHeader.mjs doesn't exist
            .json
              Field 'browser' doesn't contain a valid alias configuration
              /home/julian/Desktop/my-app/my-app-client/src/bundles/home/components/CoinPageHeader.json doesn't exist
            as directory
              /home/julian/Desktop/my-app/my-app-client/src/bundles/home/components/CoinPageHeader doesn't exist
[/home/julian/Desktop/my-app/my-app-client/src/bundles/home/components/node_modules]
[/home/julian/Desktop/my-app/my-app-client/src/bundles/home/node_modules]
[/home/julian/Desktop/my-app/my-app-client/src/bundles/node_modules]
[/home/julian/Desktop/my-app/my-app-client/src/node_modules]
[/home/julian/Desktop/my-app/node_modules]
[/home/julian/Desktop/node_modules]
[/home/julian/node_modules]
[/home/node_modules]
[/node_modules]
[/home/julian/Desktop/my-app/my-app-client/node_modules/bundles/home/components/CoinPageHeader]
[/home/julian/Desktop/my-app/my-app-client/node_modules/bundles/home/components/CoinPageHeader.js]
[/home/julian/Desktop/my-app/my-app-client/node_modules/bundles/home/components/CoinPageHeader.jsx]
[/home/julian/Desktop/my-app/my-app-client/node_modules/bundles/home/components/CoinPageHeader.vue]
[/home/julian/Desktop/my-app/my-app-client/node_modules/bundles/home/components/CoinPageHeader.ts]
[/home/julian/Desktop/my-app/my-app-client/node_modules/bundles/home/components/CoinPageHeader.tsx]
[/home/julian/Desktop/my-app/my-app-client/node_modules/bundles/home/components/CoinPageHeader.mjs]
[/home/julian/Desktop/my-app/my-app-client/node_modules/bundles/home/components/CoinPageHeader.json]
[/home/julian/Desktop/my-app/my-app-client/node_modules/bundles/home/components/CoinPageHeader]
[/home/julian/Desktop/my-app/my-app-client/node_modules/bundles/home/components/CoinPageHeader]
[/home/julian/Desktop/my-app/my-app-client/node_modules/bundles/home/components/CoinPageHeader.js]
[/home/julian/Desktop/my-app/my-app-client/node_modules/bundles/home/components/CoinPageHeader.jsx]
[/home/julian/Desktop/my-app/my-app-client/node_modules/bundles/home/components/CoinPageHeader.vue]
[/home/julian/Desktop/my-app/my-app-client/node_modules/bundles/home/components/CoinPageHeader.ts]
[/home/julian/Desktop/my-app/my-app-client/node_modules/bundles/home/components/CoinPageHeader.tsx]
[/home/julian/Desktop/my-app/my-app-client/node_modules/bundles/home/components/CoinPageHeader.mjs]
[/home/julian/Desktop/my-app/my-app-client/node_modules/bundles/home/components/CoinPageHeader.json]
[/home/julian/Desktop/my-app/my-app-client/node_modules/bundles/home/components/CoinPageHeader]
[/home/julian/Desktop/my-app/my-app-client/node_modules/@neutrinojs/web/node_modules/bundles/home/components/CoinPageHeader]
[/home/julian/Desktop/my-app/my-app-client/node_modules/@neutrinojs/web/node_modules/bundles/home/components/CoinPageHeader.js]
[/home/julian/Desktop/my-app/my-app-client/node_modules/@neutrinojs/web/node_modules/bundles/home/components/CoinPageHeader.jsx]
[/home/julian/Desktop/my-app/my-app-client/node_modules/@neutrinojs/web/node_modules/bundles/home/components/CoinPageHeader.vue]
[/home/julian/Desktop/my-app/my-app-client/node_modules/@neutrinojs/web/node_modules/bundles/home/components/CoinPageHeader.ts]
[/home/julian/Desktop/my-app/my-app-client/node_modules/@neutrinojs/web/node_modules/bundles/home/components/CoinPageHeader.tsx]
[/home/julian/Desktop/my-app/my-app-client/node_modules/@neutrinojs/web/node_modules/bundles/home/components/CoinPageHeader.mjs]
[/home/julian/Desktop/my-app/my-app-client/node_modules/@neutrinojs/web/node_modules/bundles/home/components/CoinPageHeader.json]
[/home/julian/Desktop/my-app/my-app-client/node_modules/@neutrinojs/web/node_modules/bundles/home/components/CoinPageHeader]
[/home/julian/Desktop/my-app/my-app-client/node_modules/@neutrinojs/react/node_modules/bundles/home/components/CoinPageHeader]
[/home/julian/Desktop/my-app/my-app-client/node_modules/@neutrinojs/react/node_modules/bundles/home/components/CoinPageHeader.js]
[/home/julian/Desktop/my-app/my-app-client/node_modules/@neutrinojs/react/node_modules/bundles/home/components/CoinPageHeader.jsx]
[/home/julian/Desktop/my-app/my-app-client/node_modules/@neutrinojs/react/node_modules/bundles/home/components/CoinPageHeader.vue]
[/home/julian/Desktop/my-app/my-app-client/node_modules/@neutrinojs/react/node_modules/bundles/home/components/CoinPageHeader.ts]
[/home/julian/Desktop/my-app/my-app-client/node_modules/@neutrinojs/react/node_modules/bundles/home/components/CoinPageHeader.tsx]
[/home/julian/Desktop/my-app/my-app-client/node_modules/@neutrinojs/react/node_modules/bundles/home/components/CoinPageHeader.mjs]
[/home/julian/Desktop/my-app/my-app-client/node_modules/@neutrinojs/react/node_modules/bundles/home/components/CoinPageHeader.json]
[/home/julian/Desktop/my-app/my-app-client/node_modules/@neutrinojs/react/node_modules/bundles/home/components/CoinPageHeader]
[/home/julian/Desktop/my-app/my-app-client/src/bundles/home/components/CoinPageHeader]
[/home/julian/Desktop/my-app/my-app-client/src/bundles/home/components/CoinPageHeader.js]
[/home/julian/Desktop/my-app/my-app-client/src/bundles/home/components/CoinPageHeader.jsx]
[/home/julian/Desktop/my-app/my-app-client/src/bundles/home/components/CoinPageHeader.vue]
[/home/julian/Desktop/my-app/my-app-client/src/bundles/home/components/CoinPageHeader.ts]
[/home/julian/Desktop/my-app/my-app-client/src/bundles/home/components/CoinPageHeader.tsx]
[/home/julian/Desktop/my-app/my-app-client/src/bundles/home/components/CoinPageHeader.mjs]
[/home/julian/Desktop/my-app/my-app-client/src/bundles/home/components/CoinPageHeader.json]
[/home/julian/Desktop/my-app/my-app-client/src/bundles/home/components/CoinPageHeader]
 @ ./src/bundles/home/components/Layout.jsx 15:0-68
 @ ./src/bundles/home/containers/LayoutContainer.js
 @ ./src/bundles/home/index.js
 @ ./src/components/App.jsx
 @ ./src/index.js
 @ multi (webpack)-dev-server/client?http://localhost:5000 (webpack)/hot/dev-server.js ./node_modules/@neutrinojs/react/node_modules/react-hot-loader/patch.js ./src/index

My .neutrinorc.js is pretty standard:

const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
const webpack = require('webpack');

module.exports = {
  use: [
    ['@neutrinojs/react', {
      html: {
        title: 'my-app',
        mobile: true,
        links: [
          {
            href: '/static/favicon.ico',
            rel: 'shortcut icon',
            type: 'image/x-icon',
          },
        ],
      },
      style: {
        loaders: [
          {
            loader: 'sass-loader',
            useId: 'sass',
          },
          {
            loader: 'less-loader',
            usdId: 'less',
            options: {
              javascriptEnabled: true,
            },
          },
          {
            loader: 'css-loader',
            useId: 'css'
          }
        ],
        test: /\.(less|sass|scss|css)$/,
        modulesTest: /\.module.(less|sass|scss|css)$/,
      },
    }],
    (neutrino) => neutrino.config.node.set('Buffer', true),
    neutrino => neutrino.config.plugin('ignore')
      .use(webpack.IgnorePlugin, [/^\.\/locale$/, /moment$/]),
    neutrino => neutrino.config.resolve.modules.add(neutrino.options.source),
    neutrino => neutrino.config.output.set('publicPath', '/'),
    (neutrino) => neutrino.config
      .entry('vendor')
      .add('history')
      .add('js-cookie')
      .add('lodash')
      .add('prop-types')
      .add('react')
      .add('react-dom')
      .add('react-redux')
      .add('react-router-redux')
      .add('moment')
      .add('query-string')
      .add('less')
      .add('less-loader')
      .add('react-router-dom')
      .add('redux')
      .add('redux-actions')
      .add('redux-auth-wrapper')
      .add('redux-saga')
      .add('validator')
      .add('whatwg-fetch'),
  ],
  env: {
    NODE_ENV: {
      development: {
        use: [
          (neutrino) => neutrino.config.plugin('analyzer')
            .use(BundleAnalyzerPlugin, [{ openAnalyzer: false }]),
        ]
      }
    }
  }
};

Seems related to this actually: https://stackoverflow.com/questions/43037590/field-browser-doesnt-contain-a-valid-alias-configuration?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa

Feature request or enhancement?

Please describe your request in detail. Use the following questions as guidance:

  • What is the goal of the change?
  • What are the pros and cons of the change?
  • Could this dramatically improve the experience of our users?
@edmorley
Copy link
Member

Hi! Thank you for filing this issue -- I get these verbose error messages in my projects and they annoy me too! (I should have looked into this sooner haha)

Digging around I found webpack/webpack#818, which said that the error message is only shown when stats: {errorDetails: true}, which we for some reason set here for neutrino start:
https://github.com/mozilla-neutrino/neutrino-dev/blob/e6d1c7198fb39b5659d72640bcba508fea6d8261/packages/dev-server/index.js#L50

We don't set that pref for neutrino build:
https://github.com/mozilla-neutrino/neutrino-dev/blob/e6d1c7198fb39b5659d72640bcba508fea6d8261/packages/neutrino/src/webpack.js#L8
https://github.com/mozilla-neutrino/neutrino-dev/blob/e6d1c7198fb39b5659d72640bcba508fea6d8261/packages/neutrino/bin/build.js#L33-L40

...however the linked webpack issue above says that stats.toJSON() defaults that pref to on, and we use that for the build errors specifically -- which is why neutrino build also ends up being spammy.

The issue is made worse by the fact that Neutrino defaults to having a long list of file extensions (we should probably make .vue and similar only be set if using that preset).

In the meantime a workaround for the neutrino start case is (there isn't one for neutrino build unfortunately):

module.exports = {
  use: [
    [
      '@neutrinojs/react',
      {
        devServer: {
          stats: {
            errorDetails: false,
          },
        },
      },
    ],
  ]
};

Thankfully the build case will be fixed by #852 (which will be in Neutrino 9) - since it switches to using the native webpack CLI tools - so doesn't hand-roll the errors analysis.

However we'll still need to fix the devserver's stats to stop setting errorDetails: true.

@eliperelman, do you think we can backport errorDetails: false for devserver to Neutrino 8 as a fix rather than a breaking change?

@edmorley edmorley added the bug label May 18, 2018
@eliperelman
Copy link
Member

@edmorley I'm OK with that, I'd count it more as a bug than a breaking change.

@edmorley edmorley self-assigned this Jun 7, 2018
edmorley added a commit that referenced this issue Jun 7, 2018
This restores the webpack default of not outputting the full stack
trace for compile errors, since it's typically pretty spammy and
doesn't really help with understanding the error.

Fixes #875 for dev-server (#852 already fixed it for `yarn build`).
@edmorley
Copy link
Member

v8.3.0 has just been released, which includes the fix for devServer (builds will be fixed in Neutrino 9).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

Successfully merging a pull request may close this issue.

3 participants