Skip to content

Commit

Permalink
Fix broken npm installation and builds
Browse files Browse the repository at this point in the history
This commit fixes two issues:
a. Fix `npm install` not working
b. Fix building not working after npm install fix.

npm install fails with dependency resolution issue due to Vue CLI as
following:

```txt
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: cache-loader@4.1.0
...
```txt

As suggested in Vue issues regenerating packages-lock.json solves the
issue, see: vuejs/vue-cli#6793, vuejs/vue-cli#7095.

However with the new package-lock.json a Font Awesome dependency issue
breaks the builds such as the following:

```txt
ERROR in src/presentation/bootstrapping/Modules/IconBootstrapper.ts:17:7
TS2345: Argument of type 'IconDefinition' is not assignable to parameter of type 'IconDefinitionOrPack'.
  Type 'IconDefinition' is not assignable to type 'IconPack'.
    Index signature for type 'string' is missing in type 'IconDefinition'.
    15 |   public bootstrap(vue: VueConstructor): void {
    16 |     library.add(
  > 17 |       faGithub,
```

This is solved by adding a patch in `tsconfig.json`. This issue was
discussed in FortAwesome/Font-Awesome#12575 where the workaround was
recommended.
  • Loading branch information
undergroundwires committed Sep 22, 2022
1 parent 8608072 commit 924b326
Show file tree
Hide file tree
Showing 2 changed files with 7,536 additions and 7,600 deletions.
Loading

0 comments on commit 924b326

Please sign in to comment.