This is my Docker file, and I am using Mac OS. FROM node:15.5.0-alpine
COPY package.json .
COPY . .
RUN yarn build
CMD yarn start I have used the next build, and true enough the assets are no longer required. However, running using your Dockerfile result in the same error. So that didn't solve it. What I did was to increase my Docker resource memory from 1GB initially to 8.5GB, and it works now. I have no clue why this resolves it.
... View more
Hey Rene, I am not clear with what you are suggesting. The map wouldn't function without the assets in the public folder. I have just tried it. The @Anonymous User/core version that I am using is 4.18.1
... View more
Followed the instructions here by @BenElan in setting up ArcGIS in a Next JS app. For this test, I have used @BenElan repository sample in particular, jaspi-create-next-app. All works fine in my local computer, and I was able to run `yarn build` successfully. I added a new Dockerfile. However, the build fails when I run `yarn build` inside a Docker container. I confirm that by removing the `EsriMapwithNoSSR` component will result in a successful build. So the issue lies with the way arcgis@core and Next JS works. I suspect a memory leak is occurring somewhere. Here is the logs from the build : --- Mings-MacBook-Pro:jsapi-create-next-app ming$ docker build . -t test2 [+] Building 154.9s (10/10) FINISHED => [internal] load build definition from Dockerfile 0.0s => => transferring dockerfile: 37B 0.0s => [internal] load .dockerignore 0.0s => => transferring context: 34B 0.0s => [internal] load metadata for docker.io/library/node:15.5.0-alpine 0.9s => [1/6] FROM docker.io/library/node:15.5.0-alpine@sha256:5b91260f78485bfd4a1614f1afa9afd59920e4c35047ed1c2b8cde4 0.0s => [internal] load build context 0.4s => => transferring context: 296.34kB 0.3s => CACHED [2/6] WORKDIR /user/src/playstation 0.0s => [3/6] COPY package.json . 0.1s => [4/6] RUN yarn 72.0s => [5/6] COPY . . 0.8s => ERROR [6/6] RUN yarn build 80.5s ------ > [6/6] RUN yarn build: #10 0.921 yarn run v1.22.5 #10 1.040 $ next build #10 2.922 Browserslist: caniuse-lite is outdated. Please run: #10 2.922 npx browserslist@latest --update-db #10 3.278 info - Creating an optimized production build... #10 3.309 Attention: Next.js now collects completely anonymous telemetry regarding usage. #10 3.309 This information is used to shape Next.js' roadmap and prioritize features. #10 3.309 You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL: #10 3.309 https://nextjs.org/telemetry #10 3.309 #10 79.91 error Command failed with signal "SIGKILL". #10 79.91 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. ------
... View more