input-output-hk / input-output-hk/mantis-explorer

"yarn build" doesnt work

Open
#2 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
0
Forks
1
PR merge metrics
No merged PRs in 30d

Description

Some part of the optimization process in the production webpack configuration is causing the yarn build to fail with the error:

```
$ yarn build
yarn run v1.22.2
node scripts/build.js
Creating an optimized production build...
Failed to compile.

Failed to minify the code from this file:

./node_modules/@ethersproject/bytes/lib.esm/index.js:35

Read more here: http://bit.ly/2tRViJ9

error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

```

Using a development build works however:

```
modified scripts/build.js
@@ -1,8 +1,8 @@
'use strict';

// Do this as the first thing so that any code reading it knows the right env.
-process.env.BABEL_ENV = 'production';
-process.env.NODE_ENV = 'production';
+process.env.BABEL_ENV = 'development';
+process.env.NODE_ENV = 'development';

// Makes the script crash on unhandled rejections instead of silently
// ignoring them. In the future, promise rejections that are not handled will
@@ -18,7 +18,8 @@ const path = require('path');
const chalk = require('chalk');
const fs = require('fs-extra');
const webpack = require('webpack');
-const config = require('../config/webpack.config.prod');
+// const config = require('../config/webpack.config.prod');
+const config = require('../config/webpack.config.dev');
const paths = require('../config/paths');
const checkRequiredFiles = require('react-dev-utils/checkRequiredFiles');
const formatWebpackMessages = require('react-dev-utils/formatWebpackMessages');
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.