langchain-ai / chat-langchainjs

💬 Chat with the LangChain JS/TS documentation, with sources. 💬
https://chatjs.langchain.com
MIT License
234 stars 75 forks source link

Unable to run build command at root #16

Open lohitakshsingla0 opened 6 months ago

lohitakshsingla0 commented 6 months ago

Hi All,

Can anyone help me here. I am facing the below issue while running build command at root. Anyone facing or faced similar issue.

`npm run build --filter=backend

> chat-langchainjs@0.0.0 build
> yarn run turbo:command build

• Packages in scope: backend, chat-langchain
• Running build in 2 packages
• Remote caching disabled
chat-langchain:build: cache miss, executing cb8d956dc70aeeb0
backend:build: cache miss, executing f9fd8a368a604ce4
chat-langchain:build:    Creating an optimized production build ...
backend:build: [Error: EPERM: operation not permitted, unlink 'C:\Users................`

Thanks in advance!

bracesproul commented 6 months ago

If you run yarn build --filter=backend does it still fail?

lohitakshsingla0 commented 6 months ago

If you run yarn build --filter=backend does it still fail?

Yes, after that only i used npm run build.

Did you faced any similar issue?

bracesproul commented 6 months ago

If you run yarn build --filter=backend does it still fail?

Yes, after that only i used npm run build.

Did you faced any similar issue?

You should be using yarn for this project, not NPM. Does it work if you run yarn build --filter=backend, and if so could you send me the yarn error.

mermercury commented 6 months ago

If you run yarn build --filter=backend does it still fail?

Yes, after that only i used npm run build. Did you faced any similar issue?

You should be using yarn for this project, not NPM. Does it work if you run yarn build --filter=backend, and if so could you send me the yarn error.

hi, I used yarn and faced this error: ╭───────────────────────────────────────────────────────────────────────╮ │ │ │ Update available v1.12.3 ≫ v1.12.4 │ │ Changelog: https://github.com/vercel/turbo/releases/tag/v1.12.4 │ │ Run "npx @turbo/codemod@latest update" to update │ │ │ │ Follow @turborepo for updates: https://x.com/turborepo │ ╰───────────────────────────────────────────────────────────────────────╯ WARNING stale pid file at "C:\Users\Lenovo\AppData\Local\Temp\turbod\d6841cd07b6bbdde\turbod.pid" • Packages in scope: backend • Running build in 1 packages • Remote caching disabled backend:build: cache miss, executing 3473bc159ff870b4 backend:build: [Error: EPERM: operation not permitted, unlink 'D:\chat-langchainjs-main\backend.turbo\turbo-build.log'] { backend:build: errno: -4048, backend:build: code: 'EPERM', backend:build: syscall: 'unlink', backend:build: path: 'D:\chat-langchainjs-main\backend\.turbo\turbo-build.log' backend:build: } backend:build: ERROR: command finished with error: command (D:\react\chat-langchainjs-main\backend) C:\Users\Lenovo\AppData\Local\Temp\xfs-f6567ff4\yarn.cmd run build exited (1) backend#build: command (D:\chat-langchainjs-main\backend) C:\Users\Lenovo\AppData\Local\Temp\xfs-f6567ff4\yarn.cmd run build exited (1)

Tasks: 0 successful, 1 total Cached: 0 cached, 1 total Time: 3.862s Failed: backend#build

ERROR run failed: command exited (1) Thanks in advance!

ChendayUP commented 5 months ago

If you run yarn build --filter=backend does it still fail?

Yes, after that only i used npm run build. Did you faced any similar issue?

You should be using yarn for this project, not NPM. Does it work if you run yarn build --filter=backend, and if so could you send me the yarn error.

hi, I used yarn and faced this error: ╭───────────────────────────────────────────────────────────────────────╮ │ │ │ Update available v1.12.3 ≫ v1.12.4 │ │ Changelog: https://github.com/vercel/turbo/releases/tag/v1.12.4 │ │ Run "npx @turbo/codemod@latest update" to update │ │ │ │ Follow @turborepo for updates: https://x.com/turborepo │ ╰───────────────────────────────────────────────────────────────────────╯ WARNING stale pid file at "C:\Users\Lenovo\AppData\Local\Temp\turbod\d6841cd07b6bbdde\turbod.pid" • Packages in scope: backend • Running build in 1 packages • Remote caching disabled backend:build: cache miss, executing 3473bc159ff870b4 backend:build: [Error: EPERM: operation not permitted, unlink 'D:\chat-langchainjs-main\backend.turbo\turbo-build.log'] { backend:build: errno: -4048, backend:build: code: 'EPERM', backend:build: syscall: 'unlink', backend:build: path: 'D:\chat-langchainjs-main\backend.turbo\turbo-build.log' backend:build: } backend:build: ERROR: command finished with error: command (D:\react\chat-langchainjs-main\backend) C:\Users\Lenovo\AppData\Local\Temp\xfs-f6567ff4\yarn.cmd run build exited (1) backend#build: command (D:\chat-langchainjs-main\backend) C:\Users\Lenovo\AppData\Local\Temp\xfs-f6567ff4\yarn.cmd run build exited (1)

Tasks: 0 successful, 1 total Cached: 0 cached, 1 total Time: 3.862s Failed: backend#build

ERROR run failed: command exited (1) Thanks in advance!

I also have the same problem

felipegtx commented 4 months ago

I'm facing this same problem on my end.

I've even tried running it on a standalone Powershell window with Admin privileges and got the same error.

To add more context to my particular environment:

Here's the log for yarn install:

yarn install
➤ YN0000: ┌ Resolution step
➤ YN0060: │ backend@workspace:backend provides weaviate-ts-client (pf931d) with version 2.0.0, which doesn't satisfy what langchain and some of its descendants request
➤ YN0002: │ chat-langchain@workspace:frontend doesn't provide @chakra-ui/system (p73d29), requested by @chakra-ui/icons
➤ YN0060: │ chat-langchain@workspace:frontend provides weaviate-ts-client (p4756e) with version 2.0.0, which doesn't satisfy what langchain requests
➤ YN0002: │ weaviate-ts-client@npm:2.0.0 doesn't provide graphql (pf798f), requested by graphql-request
➤ YN0000: │ Some peer dependencies are incorrectly met; run yarn explain peer-requirements <hash> for details, where <hash> is the six-letter p-prefixed code
➤ YN0000: └ Completed in 0s 654ms
➤ YN0000: ┌ Fetch step
➤ YN0013: │ yargs-parser@npm:21.1.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ yargs@npm:17.7.2 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ yocto-queue@npm:0.1.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ zod-to-json-schema@npm:3.22.4 can't be found in the cache and will be fetched from the remote registry    
➤ YN0013: │ zod@npm:3.22.4 can't be found in the cache and will be fetched from the remote registry
➤ YN0000: └ Completed in 6s 831ms
➤ YN0000: ┌ Link step
➤ YN0007: │ esbuild@npm:0.18.20 must be built because it never has been before or the last one failed
➤ YN0007: │ @swc/core@npm:1.4.0 [93b36] must be built because it never has been before or the last one failed
➤ YN0007: │ esbuild@npm:0.19.12 must be built because it never has been before or the last one failed
➤ YN0000: └ Completed in 32s 470ms
➤ YN0000: Done with warnings in 40s 267ms

Then yarn build...

yarn build --filter=backend
• Packages in scope: backend
• Running build in 1 packages
• Remote caching disabled
backend:build: cache miss, executing 410a2a1a5421188e
backend:build: [Error: EPERM: operation not permitted, unlink 'C:\Users\nnn\Documents\git\chama-v2\backend\.turbo\turbo-build.log'] {
backend:build:   errno: -4048,
backend:build:   code: 'EPERM',
backend:build:   syscall: 'unlink',
backend:build:   path: 'C:\\Users\\nnn\\Documents\\git\\v2\\backend\\.turbo\\turbo-build.log'
backend:build: }
backend:build: ERROR: command finished with error: command (C:\Users\nnn\Documents\git\v2\backend) C:\Users\nnn\AppData\Local\Temp\xfs-4b6742fe\yarn.cmd run build exited (1)
backend#build: command (C:\Users\nnn\Documents\git\v2\backend) C:\Users\nnn\AppData\Local\Temp\xfs-4b6742fe\yarn.cmd run build exited (1)

 Tasks:    0 successful, 1 total
Cached:    0 cached, 1 total
  Time:    4.032s
Failed:    backend#build

 ERROR  run failed: command  exited (1)
shanumas commented 2 months ago

Close VSCode, use terminal outside VScode to build. Works fine

ChendayUP commented 1 month ago

yarn build --filter=backend operation not permitted error in backend folder: change package.json file '"clean": "rimraf .turbo/ dist/",' -> '"clean": "rimraf dist/",'
remove '.turbo/' can fix this error