Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm ERR! Error: command failed #306

Open
TimaxLacs opened this issue Apr 16, 2024 · 2 comments
Open

npm ERR! Error: command failed #306

TimaxLacs opened this issue Apr 16, 2024 · 2 comments

Comments

@TimaxLacs
Copy link
Contributor

TimaxLacs commented Apr 16, 2024

image

Error GitPod Task 1:

npm ERR! Lifecycle script `package:build` failed with error: 
npm ERR! Error: command failed 
npm ERR!   in workspace: @deep-foundation/deepcase@0.0.109 
npm ERR!   at location: /workspace/dev/packages/deepcase

image

Error GitPod Task 2:

[4] [10:58:34] Failed to load external module: ts-node/register
[4] [10:58:34] Error: Cannot find module 'ts-node/register' from '/workspace/dev'
[4] [10:58:34] Failed to load external module: sucrase/register/ts
[4] [10:58:34] Error: Cannot find module 'sucrase/register/ts' from '/workspace/dev'
[4] [10:58:34] Failed to load external module: @babel/register
[4] [10:58:34] Error: Cannot find module '@babel/register' from '/workspace/dev'
[4] [10:58:34] Failed to load external module: esbuild-register/dist/node
[4] [10:58:34] Error: Cannot find module 'esbuild-register/dist/node' from '/workspace/dev'
[4] [10:58:34] Failed to load external module: @swc/register
[4] [10:58:34] Error: Cannot find module '@swc/register' from '/workspace/dev'
[4] [10:58:34] Local modules not found in /workspace/dev
[4] [10:58:34] Try running: npm install
[4] sleep 120 && npm run gitpod-hasura-reattach exited with code 1

image

Example link repository:

https://github.com/deep-foundation/dev/commit/1f7f39c407db455170034f315b684b67970ebfcc
@TimaxLacs
Copy link
Contributor Author

TimaxLacs commented Apr 16, 2024

Если выполнить установку ts-loader:

npm install --save-dev ts-loader

и выполнить снова команду пребилда в GitPod Task 1, то откроется 3007 порт, но в нем будет данная ошибка:

Unhandled Runtime Error
ApolloError: Response not successful: Received status code 500

Call Stack
new ApolloError
javascript/node_modules/@apollo/client/errors/index.js (39:0)
eval
javascript/node_modules/@apollo/client/core/QueryManager.js (772:37)
both
javascript/node_modules/@apollo/client/utilities/observables/asyncMap.js (22:0)
eval
javascript/node_modules/@apollo/client/utilities/observables/asyncMap.js (11:56)
new Promise
<anonymous>
Object.then
javascript/node_modules/@apollo/client/utilities/observables/asyncMap.js (11:0)
Object.eval [as error]
javascript/node_modules/@apollo/client/utilities/observables/asyncMap.js (24:0)
notifySubscription
javascript/node_modules/zen-observable-ts/module.js (137:0)
onNotify
javascript/node_modules/zen-observable-ts/module.js (176:0)
SubscriptionObserver.error
javascript/node_modules/zen-observable-ts/module.js (229:0)
eval
javascript/node_modules/@apollo/client/utilities/observables/iteration.js (7:49)
Array.forEach
<anonymous>
iterateObserversSafely
javascript/node_modules/@apollo/client/utilities/observables/iteration.js (7:0)
Object.error
javascript/node_modules/@apollo/client/utilities/observables/Concast.js (76:42)
notifySubscription
javascript/node_modules/zen-observable-ts/module.js (137:0)
onNotify
javascript/node_modules/zen-observable-ts/module.js (176:0)
SubscriptionObserver.error
javascript/node_modules/zen-observable-ts/module.js (229:0)
handleError
javascript/node_modules/@apollo/client/link/http/parseAndCheckHttpResponse.js (167:0)
eval
javascript/node_modules/@apollo/client/link/http/createHttpLink.js (145:27)

image

image

при этом 3006 порт не был запущен.
Error GitPod Task 2:

a https://3006-deepfoundation-dev-ih7upfamtap.ws-eu110.gitpod.io//api/reserved-cleaner
[4] [12:09:29] Finished 'gitpod:hasura:reattach' after 1.77 s
[4] sleep 120 && npm run gitpod-hasura-reattach exited with code 0
[0] Failed to proxy http://localhost:3006/gql Error: connect ECONNREFUSED ::1:3006
[0]     at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
[0]     at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
[0]   errno: -111,
[0]   code: 'ECONNREFUSED',
[0]   syscall: 'connect',
[0]   address: '::1',
[0]   port: 3006
[0] }
[0] Error: connect ECONNREFUSED ::1:3006
[0]     at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
[0]     at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
[0]   errno: -111,
[0]   code: 'ECONNREFUSED',
[0]   syscall: 'connect',
[0]   address: '::1',
[0]   port: 3006
[0] }
[0]  ⚠ ../deeplinks/imports/client.js
[0] Critical dependency: the request of a dependency is an expression
[0] 
[0] Import trace for requested module:
[0] ../deeplinks/imports/client.js
[0] 
[0] ../deeplinks/imports/client.js
[0] Critical dependency: the request of a dependency is an expression
[0] 
[0] Import trace for requested module:
[0] ../deeplinks/imports/client.js
[0] ./pages/index.tsx
[0] Failed to proxy http://localhost:3006/gql Error: connect ECONNREFUSED ::1:3006
[0]     at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
[0]     at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
[0]   errno: -111,
[0]   code: 'ECONNREFUSED',
[0]   syscall: 'connect',
[0]   address: '::1',
[0]   port: 3006
[0] }
[0] Error: connect ECONNREFUSED ::1:3006
[0]     at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
[0]     at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
[0]   errno: -111,
[0]   code: 'ECONNREFUSED',
[0]   syscall: 'connect',
[0]   address: '::1',
[0]   port: 3006
[0] }
[0] Failed to proxy http://localhost:3006/gql Error: connect ECONNREFUSED ::1:3006
[0]     at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
[0]     at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
[0]   errno: -111,
[0]   code: 'ECONNREFUSED',
[0]   syscall: 'connect',
[0]   address: '::1',
[0]   port: 3006
[0] }
[0] Error: connect ECONNREFUSED ::1:3006
[0]     at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
[0]     at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
[0]   errno: -111,
[0]   code: 'ECONNREFUSED',
[0]   syscall: 'connect',
[0]   address: '::1',
[0]   port: 3006
[0] }
[0] Failed to proxy http://localhost:3006/gql Error: connect ECONNREFUSED ::1:3006
[0]     at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
[0]     at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
[0]   errno: -111,
[0]   code: 'ECONNREFUSED',
[0]   syscall: 'connect',
[0]   address: '::1',
[0]   port: 3006
[0] }
[0] Error: connect ECONNREFUSED ::1:3006
[0]     at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
[0]     at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
[0]   errno: -111,
[0]   code: 'ECONNREFUSED',
[0]   syscall: 'connect',
[0]   address: '::1',
[0]   port: 3006
[0] }
[0]  ⚠ ../deeplinks/imports/client.js
[0] Critical dependency: the request of a dependency is an expression
[0] 
[0] Import trace for requested module:
[0] ../deeplinks/imports/client.js
...
...
...
...
[0] Import trace for requested module:
[0] ../deeplinks/imports/client.js
[0] ./pages/index.tsx
[0] execa/lib/errname: unable to establish process.binding('uv') Error: process.binding is not supported
[0]     at process.binding (/workspace/dev/node_modules/process/browser.js:177:11)
[0]     at eval (webpack-internal:///(api)/../deeplinks/node_modules/execa/lib/errname.js:13:15)
[0]     at (api)/../deeplinks/node_modules/execa/lib/errname.js (/workspace/dev/packages/deepcase-app/app/server/vendor-chunks/execa.js:30:1)
[0]     at __webpack_require__ (/workspace/dev/packages/deepcase-app/app/server/webpack-api-runtime.js:33:42)
[0]     at eval (webpack-internal:///(api)/../deeplinks/node_modules/execa/index.js:12:17)
[0]     at (api)/../deeplinks/node_modules/execa/index.js (/workspace/dev/packages/deepcase-app/app/server/vendor-chunks/execa.js:20:1)
[0]     at __webpack_require__ (/workspace/dev/packages/deepcase-app/app/server/webpack-api-runtime.js:33:42)
[0]     at eval (webpack-internal:///(api)/../deeplinks/node_modules/shell-env/index.js:3:15)
[0]     at (api)/../deeplinks/node_modules/shell-env/index.js (/workspace/dev/packages/deepcase-app/app/server/vendor-chunks/shell-env.js:20:1)
[0]     at __webpack_require__ (/workspace/dev/packages/deepcase-app/app/server/webpack-api-runtime.js:33:42)
[0]     at eval (webpack-internal:///(api)/../deeplinks/node_modules/shell-path/index.js:2:18)
[0]     at (api)/../deeplinks/node_modules/shell-path/index.js (/workspace/dev/packages/deepcase-app/app/server/vendor-chunks/shell-path.js:20:1)
[0]     at __webpack_require__ (/workspace/dev/packages/deepcase-app/app/server/webpack-api-runtime.js:33:42)
[0]     at eval (webpack-internal:///(api)/../deeplinks/node_modules/fix-path/index.js:3:19)
[0]     at (api)/../deeplinks/node_modules/fix-path/index.js (/workspace/dev/packages/deepcase-app/app/server/vendor-chunks/fix-path.js:20:1)
[0] __dirname /workspace/dev/packages/deepcase-app/app/server/pages/api
[0] rootDir /workspace/dev/packages/deepcase-app
[0] MIGRATIONS_DIR /tmp/deep
[0] existsSync deep true
[0] existsSync logs true
[0] MIGRATIONS_DIR /tmp/deep
[0] existsSync deep true
[0] existsSync logs true
[0] MIGRATIONS_DIR /tmp/deep
[0] existsSync deep true
[0] existsSync logs true
[0] MIGRATIONS_DIR /tmp/deep
...
...
...

@TimaxLacs
Copy link
Contributor Author

TimaxLacs commented Apr 16, 2024

3007 порт запуститься, если:

  1. снова выполнить ./prebuild.sh | tee gitpod-prebuild.log.txt
  2. остановить процесс в терминале GitPod Task 2
  3. выполнить последнюю команду в GitPod Task 2 заново

вот 3007 порт:
image

Docker is not detected. Check that Docker is installed and started.
Install Docker 

можно игнорировать

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant