App on Netlify
https://courageous-fox-6869a5.netlify.app
Code on Github
https://github.com/p3t3r67x0/nuxt-rc-netlify
Issue on Build
Nuxt 3 build fails as it seems to have any weird issues with the package ts-node
. I have the feeling that it might be related to this nuxt-graphql-client
package?
Anyone else has issues with deployment errors and typescript? I am thankful for any advise. More than two days I struggle to deploy a working Nuxt 3 app using Saleor GraphQL and Typescript.
Logs from Build
1:45:23 PM: Build ready to start
1:45:45 PM: build-image version: 9289b698a503f132b265bd089ab40ce1d6f9e65e (focal)
1:45:45 PM: build-image tag: v4.12.0
1:45:45 PM: buildbot version: c87074660cd9a4568c0ac759bc083987e94204b3
1:45:45 PM: Building without cache
1:45:45 PM: Starting to prepare the repo for build
1:45:45 PM: No cached dependencies found. Cloning fresh repo
1:45:45 PM: git clone https://github.com/p3t3r67x0/nuxt-rc-netlify
1:45:45 PM: Preparing Git Reference refs/heads/master
1:45:46 PM: Parsing package.json dependencies
1:45:46 PM: Different build command detected, going to use the one specified in the Netlify configuration file: 'npx pnpm install --shamefully-hoist --store=node_modules/.pnpm-store --frozen-lockfile && npm run build' versus '' in the Netlify UI
1:45:47 PM: Starting build script
1:45:47 PM: Installing dependencies
1:45:47 PM: Python version set to 2.7
1:45:47 PM: v16.17.1 is already installed.
1:45:47 PM: Now using node v16.17.1 (npm v8.15.0)
1:45:48 PM: Started restoring cached build plugins
1:45:48 PM: Finished restoring cached build plugins
1:45:48 PM: Attempting ruby version 2.7.2, read from environment
1:45:48 PM: Using ruby version 2.7.2
1:45:49 PM: Using PHP version 8.0
1:45:49 PM: No npm workspaces detected
1:45:49 PM: Started restoring cached node modules
1:45:49 PM: Finished restoring cached node modules
1:45:49 PM: Installing NPM modules using NPM version 8.15.0
1:45:49 PM: npm WARN config tmp This setting is no longer used. npm stores temporary files in a special
1:45:49 PM: npm WARN config location in the cache, and they are managed by
1:45:49 PM: npm WARN config [`cacache`](http://npm.im/cacache).
1:45:50 PM: npm WARN config tmp This setting is no longer used. npm stores temporary files in a special
1:45:50 PM: npm WARN config location in the cache, and they are managed by
1:45:50 PM: npm WARN config [`cacache`](http://npm.im/cacache).
1:45:50 PM: 8.15.0
1:45:50 PM: NPM modules installed
1:45:50 PM: npm WARN config tmp This setting is no longer used. npm stores temporary files in a special
1:45:50 PM: npm WARN config location in the cache, and they are managed by
1:45:50 PM: npm WARN config [`cacache`](http://npm.im/cacache).
1:45:50 PM: Started restoring cached go cache
1:45:50 PM: Finished restoring cached go cache
1:45:50 PM: Installing Go version 1.17 (requested 1.17)
1:45:54 PM: unset GOOS;
1:45:54 PM: unset GOARCH;
1:45:54 PM: export GOROOT='/opt/buildhome/.gimme/versions/go1.17.linux.amd64';
1:45:54 PM: export PATH="/opt/buildhome/.gimme/versions/go1.17.linux.amd64/bin:${PATH}";
1:45:54 PM: go version >&2;
1:45:54 PM: export GIMME_ENV="/opt/buildhome/.gimme/env/go1.17.linux.amd64.env"
1:45:54 PM: go version go1.17 linux/amd64
1:45:54 PM: Installing missing commands
1:45:54 PM: Verify run directory
1:45:55 PM: β
1:45:55 PM: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
1:45:55 PM: Netlify Build
1:45:55 PM: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
1:45:55 PM: β
1:45:55 PM: β― Version
1:45:55 PM: @netlify/build 27.20.1
1:45:55 PM: β
1:45:55 PM: β― Flags
1:45:55 PM: baseRelDir: true
1:45:55 PM: buildId: 6342b4538975e30b905f3c62
1:45:55 PM: deployId: 6342b4538975e30b905f3c64
1:45:55 PM: β
1:45:55 PM: β― Current directory
1:45:55 PM: /opt/build/repo
1:45:55 PM: β
1:45:55 PM: β― Config file
1:45:55 PM: /opt/build/repo/netlify.toml
1:45:55 PM: β
1:45:55 PM: β― Context
1:45:55 PM: production
1:45:55 PM: β
1:45:55 PM: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
1:45:55 PM: 1. build.command from netlify.toml
1:45:55 PM: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
1:45:55 PM: β
1:45:55 PM: $ npx pnpm install --shamefully-hoist --store=node_modules/.pnpm-store --frozen-lockfile && npm run build
1:45:55 PM: npm WARN config tmp This setting is no longer used. npm stores temporary files in a special
1:45:55 PM: npm WARN config location in the cache, and they are managed by
1:45:55 PM: npm WARN config [`cacache`](http://npm.im/cacache).
1:45:56 PM: npm WARN exec The following package was not found and will be installed: pnpm@7.13.2
1:45:57 PM: Lockfile is up to date, resolution step is skipped
1:45:57 PM: Progress: resolved 1, reused 0, downloaded 0, added 0
1:45:57 PM: Packages: +951
1:45:57 PM: ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1:45:57 PM: Packages are hard linked from the content-addressable store to the virtual store.
1:45:57 PM: Content-addressable store is at: /opt/build/repo/node_modules/.pnpm-store/v3
1:45:57 PM: Virtual store is at: node_modules/.pnpm
1:45:58 PM: Progress: resolved 951, reused 0, downloaded 93, added 88
1:45:59 PM: Progress: resolved 951, reused 0, downloaded 207, added 203
1:46:00 PM: Progress: resolved 951, reused 0, downloaded 354, added 354
1:46:01 PM: Progress: resolved 951, reused 0, downloaded 438, added 436
1:46:02 PM: Progress: resolved 951, reused 0, downloaded 616, added 611
1:46:03 PM: Progress: resolved 951, reused 0, downloaded 765, added 764
1:46:04 PM: Progress: resolved 951, reused 0, downloaded 947, added 946
1:46:04 PM: .../node_modules/vue-demi postinstall$ node ./scripts/postinstall.js
1:46:04 PM: .../node_modules/vue-demi postinstall: Done
1:46:04 PM: .../esbuild@0.15.10/node_modules/esbuild postinstall$ node install.js
1:46:04 PM: .../esbuild@0.15.10/node_modules/esbuild postinstall: Done
1:46:05 PM: Progress: resolved 951, reused 0, downloaded 951, added 951, done
1:46:05 PM: dependencies:
1:46:05 PM: + @nuxtjs/tailwindcss 5.3.5
1:46:05 PM: + @pinia/nuxt 0.4.3
1:46:05 PM: + @types/node 18.8.3
1:46:05 PM: + graphql 16.6.0
1:46:05 PM: + graphql-tag 2.12.6
1:46:05 PM: + nuxt-graphql-client 0.1.19
1:46:05 PM: + ts-node 10.9.1
1:46:05 PM: + typescript 4.8.4
1:46:05 PM: + vue 3.2.40
1:46:05 PM: + webpack 5.74.0
1:46:05 PM: devDependencies:
1:46:05 PM: + nuxt 3.0.0-rc.11
1:46:05 PM: > @ postinstall /opt/build/repo
1:46:05 PM: > nuxt prepare
1:46:05 PM: [log] Nuxi 3.0.0-rc.11
1:46:05 PM: [info] [nuxt:tailwindcss] Using default Tailwind CSS file from runtime/tailwind.css
1:46:06 PM: [error] β¨― Unable to compile TypeScript:
1:46:06 PM: error TS5083: Cannot read file '/opt/build/repo/.nuxt/tsconfig.json'.
1:46:06 PM: error TS5083: Cannot read file '.nuxt/tsconfig.json'.
1:46:06 PM: at createTSError (node_modules/.pnpm/ts-node@10.9.1_xtdkmayvpbwqd3kc4kczaw2zvm/node_modules/ts-node/src/index.ts:859:12)
1:46:06 PM: at reportTSError (node_modules/.pnpm/ts-node@10.9.1_xtdkmayvpbwqd3kc4kczaw2zvm/node_modules/ts-node/src/index.ts:863:19)
1:46:06 PM: at createFromPreloadedConfig (node_modules/.pnpm/ts-node@10.9.1_xtdkmayvpbwqd3kc4kczaw2zvm/node_modules/ts-node/src/index.ts:874:36)
1:46:06 PM: at create (node_modules/.pnpm/ts-node@10.9.1_xtdkmayvpbwqd3kc4kczaw2zvm/node_modules/ts-node/src/index.ts:624:10)
1:46:06 PM: at register (node_modules/.pnpm/ts-node@10.9.1_xtdkmayvpbwqd3kc4kczaw2zvm/node_modules/ts-node/src/index.ts:591:15)
1:46:06 PM: at TypeScriptLoader (node_modules/.pnpm/cosmiconfig-typescript-loader@4.1.1_mwz2f5nk5qxm3a6zkoxfkps5ya/node_modules/cosmiconfig-typescript-loader/dist/cjs/index.js:52:54)
1:46:06 PM: at node_modules/.pnpm/@graphql-codegen+cli@2.13.5_bcskau5n4us7t7edj5bgrx4upa/node_modules/@graphql-codegen/cli/esm/config.js:16:18
1:46:06 PM: at ModuleJob.run (node:internal/modules/esm/module_job:193:25)
1:46:06 PM: at async Promise.all (index 0)
1:46:06 PM: at async ESMLoader.import (node:internal/modules/esm/loader:533:24)
1:46:06 PM: at async normalizeModule (node_modules/.pnpm/@nuxt+kit@3.0.0-rc.11/node_modules/@nuxt/kit/dist/index.mjs:476:26)
1:46:06 PM: at async installModule (node_modules/.pnpm/@nuxt+kit@3.0.0-rc.11/node_modules/@nuxt/kit/dist/index.mjs:455:41)
1:46:06 PM: at async initNuxt (node_modules/.pnpm/nuxt@3.0.0-rc.11_typescript@4.8.4/node_modules/nuxt/dist/index.mjs:1606:7)
1:46:06 PM: at async loadNuxt (node_modules/.pnpm/nuxt@3.0.0-rc.11_typescript@4.8.4/node_modules/nuxt/dist/index.mjs:1635:5)
1:46:06 PM: at async loadNuxt (node_modules/.pnpm/@nuxt+kit@3.0.0-rc.11/node_modules/@nuxt/kit/dist/index.mjs:732:19)
1:46:06 PM: at async Object.invoke (node_modules/.pnpm/nuxi@3.0.0-rc.11/node_modules/nuxi/dist/chunks/prepare.mjs:30:18)
1:46:06 PM: at async _main (node_modules/.pnpm/nuxi@3.0.0-rc.11/node_modules/nuxi/dist/cli.mjs:50:20)
1:46:06 PM: ELIFECYCLE Command failed with exit code 1. (https://ntl.fyi/exit-code-1)
1:46:06 PM: β
1:46:06 PM: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
1:46:06 PM: "build.command" failed
1:46:06 PM: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
1:46:06 PM: β
1:46:06 PM: Error message
1:46:06 PM: Command failed with exit code 1: npx pnpm install --shamefully-hoist --store=node_modules/.pnpm-store --frozen-lockfile && npm run build (https://ntl.fyi/exit-code-1)
1:46:06 PM: β
1:46:06 PM: Error location
1:46:06 PM: In build.command from netlify.toml:
1:46:06 PM: npx pnpm install --shamefully-hoist --store=node_modules/.pnpm-store --frozen-lockfile && npm run build
1:46:06 PM: β
1:46:06 PM: Resolved config
1:46:06 PM: build:
1:46:06 PM: command: npx pnpm install --shamefully-hoist --store=node_modules/.pnpm-store --frozen-lockfile && npm run build
1:46:06 PM: commandOrigin: config
1:46:06 PM: environment:
1:46:06 PM: - NPM_FLAGS
1:46:06 PM: publish: /opt/build/repo
1:46:06 PM: publishOrigin: default
1:46:07 PM: Caching artifacts
1:46:07 PM: Started saving node modules
1:46:07 PM: Finished saving node modules
1:46:07 PM: Started saving build plugins
1:46:07 PM: Finished saving build plugins
1:46:07 PM: Started saving pip cache
1:46:07 PM: Finished saving pip cache
1:46:07 PM: Started saving emacs cask dependencies
1:46:07 PM: Finished saving emacs cask dependencies
1:46:07 PM: Started saving maven dependencies
1:46:07 PM: Finished saving maven dependencies
1:46:07 PM: Started saving boot dependencies
1:46:07 PM: Finished saving boot dependencies
1:46:07 PM: Started saving rust rustup cache
1:46:07 PM: Finished saving rust rustup cache
1:46:07 PM: Started saving go dependencies
1:46:07 PM: Finished saving go dependencies
1:46:08 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
1:46:08 PM: Creating deploy upload records
1:46:08 PM: Failing build: Failed to build site
1:46:08 PM: Failed during stage 'building site': Build script returned non-zero exit code: 2 (https://ntl.fyi/exit-code-2)
1:46:08 PM: Finished processing build request in 23.223736173s
I have been lost now, would love any help. thanks in advance