I encountered an issue with npm run build while using docker build. When I initially developed the project around 2 years ago, it worked perfectly with npm run build. However, upon rebuilding my development environment recently, I started encountering this error:
ERROR in node_modules/@types/jqueryui/index.d.ts(645,11): error TS1110: Type expected.
I attempted to resolve this by updating the typescript
version on various platforms, which did improve the situation slightly but the error persisted in one specific location. If I remove @types/jqueryui
, which is causing the error, then the error simply shifts to another package used in development.
Here are some of the steps I've taken:
(1) Tried running as is
(2) Updated the typescript
version
(3) Updated the @angular/compiler-cli
version due to its dependency with TypeScript
I would greatly appreciate any guidance on how to eliminate this persisting error. Here are more details for reference:
(1) Error when executing the build command:
> [build_Hoge-front 10/10] RUN npm run build:
...
16.32 ERROR in node_modules/@types/jquery/JQuery.d.ts(12795,21): error TS1005: ')' expected.
... (bunch of other errors)
(3) Error after changing the version of @angular/compiler-cli
:
> [build_Hoge-front 10/10] RUN npm run build:
...
20.10 ERROR in node_modules/@types/jqueryui/index.d.ts(645,11): error TS1110: Type expected.
Package.json contents:
{
"name": "Hoge-Test",
"version": "0.0.0",
"scripts": {
...
}
...
}
Dockerfile contents:
FROM node:10.16.3-stretch@sha256:f4b6f471cdd4b66b27eef899e7f8423ecd9fbfc863b2cb7a59978a7f64c8e0c3 as build-front
WORKDIR /usr/src/hoge
COPY .git ./.git
COPY front-end ./front-end
WORKDIR /usr/src/hoge/front-end
RUN apt-get install -y git
RUN npm install
RUN npm install -g <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="a6c8d6cbe6908897958891">[email protected]</a>
RUN npm install <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="c9a7aee4aaa0bbaaa5ace4b9bba6aebbacbaba89f8e7fce7f8">[email protected]</a> --save
RUN npm run build
I have experimented with different methods to address this issue such as altering package versions, however, the error persists. Any assistance or insights on resolving this problem would be highly appreciated.