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.

Parsing failed after yarn update to latest

See original GitHub issue

Expected Behavior

The application should properly compile, build, and serve.

Current Behavior

Application is unable to compile (see below for logs).

Failure Information (for bugs)

The application was building properly on version 8.1.2. I required an update to latest to fix an es5/differential loading issue. I ran yarn update as per the documentation and my application no longer compiles.

Steps to Reproduce

Please provide detailed steps for reproducing the issue.

  1. yarn update (from version 8.1.2 -> latest)
  2. yarn start

Failure Logs

Receiving the following message on compilation (yarn start):

ERROR in ./index.tsx 10:16
Module parse failed: Unexpected token (10:16)
File was processed with these loaders:
 * ../../../node_modules/@nrwl/web/node_modules/babel-loader/lib/index.js
You may need an additional loader to handle the result of these loaders.
| import { Provider } from 'react-redux';
| import App from './App';
> ReactDOM.render(<Provider store={store}>
|     <ConnectedRouter history={history}>
|       <App />
ℹ 「wdm」: Failed to compile.
No type errors found
Version: typescript 3.4.5

Other

Here are my tsconfig files (first is for global and second is for my specific application).

{
  "compileOnSave": false,
  "compilerOptions": {
    "allowJs": true,
    "sourceMap": true,
    "declaration": false,
    "moduleResolution": "node",
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "importHelpers": true,
    "target": "es5",
    "module": "esnext",
    "typeRoots": ["node_modules/@types"],
    "lib": ["es2017", "dom"],
    "skipLibCheck": true,
    "skipDefaultLibCheck": true,
    "baseUrl": ".",
    "rootDir": "."
  },
  "exclude": ["node_modules", "tmp"]
}
{
  "extends": "../../tsconfig.json",
  "compilerOptions": {
    "jsx": "react",
    "allowJs": true,
    "types": ["node", "jest"]
  },
  "paths": {
    "@components/*": ["src/components/*"],
    "@environment/*": ["src/environment/*"],
    "@redux/*": ["src/redux/*"]
  },
  "include": ["**/*.ts", "**/*.tsx"]
}

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
jaysoocommented, Oct 17, 2019

Sorry, I meant replacing the webpackConfig entry with @nrwl/react/plugins/babel.

1reaction
jaysoocommented, Oct 17, 2019

@sagarpatel8384 No problem! You can still use your own custom webpack if you want, just make sure to import the function from @nrwl/react/plugins/babel and call that in your own custom config function first.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error Codes | Yarn - Package Manager
A file from the cache has been detected unused while installing dependencies. Running yarn cache clean will cause Yarn to remove everything inside...
Read more >
yarn install failed with Module parse failed - webpack
yarn install failed with Module parse failed: Unexpected character ... I have the following configuration in my webpack.config.dev.js file
Read more >
parse-server
An express module providing a Parse-compatible API server. Latest version: 5.4.0, last published: a month ago. Start using parse-server in ...
Read more >
Project import errors
Failed to parse package.json or yarn.lock as valid JSON. Please check the package.json and lockfile is valid JSON, any manual manipulation of these...
Read more >
(No title)
Please run: npx browserslist@latest --update-db Error [ERRPACKAGEPATHNOTEXPORTED]: Package subpath './lib/parser' is not defined by "exports" in C:\Users\ ...
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