Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • C create-react-app
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,547
    • Issues 1,547
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 417
    • Merge requests 417
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Meta
  • create-react-app
  • Issues
  • #5008
Closed
Open
Issue created Sep 13, 2018 by Administrator@rootContributor

Failed to compile message without any detail.

Created by: RIP21

This is issue created for discussing fix of the weird common Alphas 2.0.0 error that looks like that: /uploads/ad61e07c71889abba3d7b3c8da95c1f6/41606667-3591d1de-73b2-11e8-8b19-3b571b63a592.png

I did some research trying to find the root cause and it seems that I found it.

Seems to be an issue in formatWebpackMessages.js

// Remove unnecessary stack added by `thread-loader`
  var threadLoaderIndex = -1;
  lines.forEach(function(line, index) {
    if (threadLoaderIndex !== -1) {
      return;
    }
    if (/thread.loader/i.test(line)) {
      threadLoaderIndex = index;
    }
  });

  if (threadLoaderIndex !== -1) {
    lines = lines.slice(0, threadLoaderIndex);
  }

This piece is deletes everything after 'thread-loader'. So when you have an error or warning it will be striped out to the path only. So message like that:

./src/elements/FormSignIn/index.js
Module Warning (from ./node_modules/thread-loader/dist/cjs.js): <<<< Takes this line index

[4m/Users/andriilos/Projects/<annon>/<annon>/src/elements/FormSignIn/index.js[24m
  [2m6:13[22m  [33mwarning[39m  'UI' is defined but never used              [2mno-unused-vars[22m
  [2m9:7[22m   [33mwarning[39m  'sleep' is assigned a value but never used  [2mno-unused-vars[22m

[33m[1m✖ 2 problems (0 errors, 2 warnings)[22m[39m
[33m[1m[22m[39m
 @ ./src/pages/SignIn/index.js 1:2249-2293 1:3910-3920
 @ ./src/App.js
 @ ./src/index.js
 @ multi ./node_modules/revolut-react-scripts/config/polyfills.js ./src/index.js <<< removes all till that line

End up like:

./src/elements/FormSignIn/index.js

So effectively changing

  if (threadLoaderIndex !== -1) {
    lines = lines.slice(0, threadLoaderIndex);
  }

to

  if (threadLoaderIndex !== -1) {
    lines.splice(threadLoaderIndex, 1);
  }

May fix this, I'm not sure about other errors and warnings formats so a little discussion will be a nice thing to do before I open a PR if you like.

Assignee
Assign to
Time tracking