Home>

]
]
I wanted to deploy nuxt.js on heroku as a container,
with docker-compose up -d
When I try to launch Docker
I get an error saying Cannot read file tsconfig.json.
I've been playing around with Nuxt.js a bit, but it's still in the project launch state.
nuxt.js introduces typescript.
Go to nuxt.js project and directly npm run dev, npm run build etc. without any problem
It is in a working state.
I get an error when I try to run it in Docker.
If i know this, please teach me.

Dockerfile

FROM node: 13.8-alpine
# RUN apk add python
RUN apk add python make g ++
RUN apk update&&\
    apk add git&&\
    apk add --no-cache curl&&\
    curl -L https://www.npmjs.com/install.sh | sh&&\
    npm install -g npm @ latest \
    npm add @ vue/cli @ vue/cli-service-global nuxt create-nuxt-app
ENV TZ Asia/Tokyo
WORKDIR/app

COPY ./project/package*.json ./
COPY ..
RUN npm install
RUN npm run build
CMD ["/ bin/ash"]

Error

>[email protected] install/app/node_modules/fibers
>node build.js || nodejs build.js
make: Entering directory'/ app/node_modules/fibers/build'
  CXX (target) Release /obj.target/fibers/src/fibers.o../src/fibers.cc: In function'void uni :: SetAccessor (v8 :: Isolate *, v8 :: Local<v8 :: Object>, v8 :: Local<v8 :: String>, uni :: FunctionType (*) (v8 :: Local<v8 :: String>, const GetterCallbackInfo&), void (*) (v8 :: Local<v8 :: String>, v8 :: Local<v8 :: Value>, const SetterCallbackInfo&)) ':
../src/fibers.cc:355:87: warning: cast between incompatible function types from'uni :: FunctionType (*) (v8 :: Local<v8 :: String>, const GetterCallbackInfo&)' {aka' void ( *) (v8 :: Local<v8 :: String>, const v8 :: PropertyCallbackInfo<v8 :: Value>&)'} to' v8 :: AccessorNameGetterCallback' {aka' void (*) (v8 :: Local<v8 :: Name>, const v8 :: PropertyCallbackInfo<v8 :: Value>&)'} [-Wcast-function-type]
  355 | object->SetAccessor (isolate->GetCurrentContext (), name, (AccessorNameGetterCallback) getter, (AccessorNameSetterCallback) setter). ToChecked ();
      | ^ ~~~~~
../src/fibers.cc:355:123: warning: cast between incompatible function types from'void (*) (v8 :: Local<v8 :: String>, v8 :: Local<v8 :: Value>, const SetterCallbackInfo&)'{aka' void (*) (v8 :: Local<v8 :: String>, v8 :: Local<v8 :: Value>, const v8 :: PropertyCallbackInfo<void>&)'} to' v8 :: AccessorNameSetterCallback'{aka' void (*) (v8 :: Local<v8 :: Name>, v8 :: Local<v8 :: Value>, const v8 :: PropertyCallbackInfo<void>&)'} [-Wcast-function- type]
  355 | object->SetAccessor (isolate->GetCurrentContext (), name, (AccessorNameGetterCallback) getter, (AccessorNameSetterCallback) setter). ToChecked ();
      | ^ ~~~~~
In file included from ../src/coroutine.h: 1,
                 from ../src/fibers.cc: 1:
../src/fibers.cc: At global scope:
/root/.cache/node-gyp/13.8.0/include/node/node.h:610:43: warning: cast between incompatible function types from'void (*) (v8 :: Local<v8 :: Object>)'To' node :: addon_register_func' {aka' void (*) (v8 :: Local<v8 :: Object>, v8 :: Local<v8 :: Value>, void *)'} [-Wcast-function- type]
  610 | (node ​​:: addon_register_func) (regfunc), \
      | ^
/root/.cache/node-gyp/13.8.0/include/node/node.h:644:3: note: in expansion of macro'NODE_MODULE_X'
  644 | NODE_MODULE_X (modname, regfunc, NULL, 0) // NOLINT (readability/null_usage)
      | ^~~~~~~~~~~~~
../src/fibers.cc: 930: 1: note: in expansion of macro'NODE_MODULE'
  930 | NODE_MODULE (fibers, init)
      | ^~~~~~~~~~~
  CXX (target) Release /obj.target/fibers/src/coroutine.o
  CC (target) Release /obj.target/fibers/src/libcoro/coro.o
  SOLINK_MODULE (target) Release /obj.target/fibers.node
  COPY Release /fibers.node
make: Leaving directory'/ app/node_modules/fibers/build'
Installed in `/app/node_modules/fibers/bin/linux-x64-79-musl/fibers.node`
>[email protected] postinstall /app/node_modules/@nuxt/babel-preset-app/node_modules/core-js
>node -e "try {require ('./ postinstall')} catch (e) {}"
Thank you for using core-js (https://github.com/zloirock/core-js) for polyfilling JavaScript standard library!
The project needs your help! Please consider supporting of core-js on Open Collective or Patreon:
>https://opencollective.com/core-js
>https://www.patreon.com/zloirock
Also, the author of core-js (https://github.com/zloirock) is looking for a good job-)

>[email protected] postinstall/app/node_modules/ejs
>node ./postinstall.jsThank you for installing EJS: built with the Jake JavaScript build tool (https://jakejs.com/)

>[email protected] postinstall /app/node_modules/core-js
>node -e "try {require ('./ postinstall')} catch (e) {}"
Thank you for using core-js (https://github.com/zloirock/core-js) for polyfilling JavaScript standard library!
The project needs your help! Please consider supporting of core-js on Open Collective or Patreon:
>https://opencollective.com/core-js
>https://www.patreon.com/zloirock
Also, the author of core-js (https://github.com/zloirock) is looking for a good job-)

>[email protected] postinstall/app/node_modules/nuxt
>opencollective || exit 0
                          Thanks for installing nuxtjs
                 Please consider donating to our open collective
                        to help us maintain this package.
                            Number of contributors: 0
                              Number of backers: 399
                              Annual budget: $83,091
                             Current balance: $55,522
                 Donate: https://opencollective.com/nuxtjs/donate
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/watchpack-chokidar2/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os": "darwin", "arch": "any"} (current: {"os": "linux", "arch": "x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents @ 2.1.3 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents @ 2.1.3: wanted {"os": "darwin", "arch": "any"} (current: {"os": "linux", "arch": "x64"})
added 1696 packages from 877 contributors and audited 1703 packages in 47.333s
175 packages are looking for funding
  run `npm fund` for details
found 0 vulnerabilities
Removing intermediate container 78842d0503b7
 --->d2deaf211a09
Step 9/10: RUN npm run build
 --->Running in 86868bedcff6
>[email protected] build/app
>nuxt-ts build
(node: 17) ExperimentalWarning: Conditional exports is an experimental feature. This feature could change at any timeFATAL ⨯ Unable to compile TypeScript:
error TS5083: Cannot read file'/app/tsconfig.json'.
  error TS5083: Cannot read file'tsconfig.json'.
  at createTSError (node_modules/ts-node/src/index.ts: 513: 12)
  at reportTSError (node_modules/ts-node/src/index.ts: 517: 19)
  at create (node_modules/ts-node/src/index.ts: 528: 36)
  at Object.register (node_modules/ts-node/src/index.ts: 410: 19)
  at this (node_modules/@ nuxt/typescript-runtime/dist/index.js: 10: 19)
  at console (node_modules/hable/src/hable.js: 68: 11)
  at node_modules/hable/src/hable.js: 4:25
  at process.name (internal/process/task_queues.js: 97: 5)
  at NuxtCommand.callHook (node_modules/hable/src/hable.js: 65: 11)
  at NuxtCommand.run (node_modules/@ nuxt/cli/dist/cli-index.js: 2780: 5)
^ [[99;139R
   ╭───────────────────────────────────────────────── ─────────╮
   │ │
   │ ✖ Nuxt Fatal Error │
   │ │
   │ TSError: ⨯ Unable to compile TypeScript: │
   │ error TS5083: Cannot read file'/app/tsconfig.json'. │
   │ │
   │ │
   ╰───────────────────────────────────────────────── ─────────╯
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build: `nuxt-ts build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2021-01-04T15_27_41_489Z-debug.log
ERROR: Service'front' failed to build: The command'/ bin/sh -c npm run build' returned a non-zero code: 1