0

In my company we moved to DevContainer. I had few PACT test that I am running with vitest. Theses tests are run and pass in local environment but as soon as I moved to DevContainer I am getting the following error when running tests wit the same command :

Command to run tests :

vitest run src/contract-test/consumer/action-consumer.test.ts

Error :

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Unhandled Error ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
RangeError: Maximum call stack size exceeded
    at get hasIndices [as hasIndices] (<anonymous>)
    at get flags [as flags] (<anonymous>)
    at String.matchAll (<anonymous>)
    at _searchLast (file:///app/.yarn/__virtual__/vite-virtual-68526d8c1a/0/cache/vite-npm-5.0.11-d5457a8b86-74a3ddc6d4.zip/node_modules/vite/dist/node/chunks/dep-V3BH7oO1.js:38476:34)
    at _interpolate (file:///app/.yarn/__virtual__/vite-virtual-68526d8c1a/0/cache/vite-npm-5.0.11-d5457a8b86-74a3ddc6d4.zip/node_modules/vite/dist/node/chunks/dep-V3BH7oO1.js:38483:40)
    at _interpolate (file:///app/.yarn/__virtual__/vite-virtual-68526d8c1a/0/cache/vite-npm-5.0.11-d5457a8b86-74a3ddc6d4.zip/node_modules/vite/dist/node/chunks/dep-V3BH7oO1.js:38509:12)
    at _interpolate (file:///app/.yarn/__virtual__/vite-virtual-68526d8c1a/0/cache/vite-npm-5.0.11-d5457a8b86-74a3ddc6d4.zip/node_modules/vite/dist/node/chunks/dep-V3BH7oO1.js:38509:12)
    at _interpolate (file:///app/.yarn/__virtual__/vite-virtual-68526d8c1a/0/cache/vite-npm-5.0.11-d5457a8b86-74a3ddc6d4.zip/node_modules/vite/dist/node/chunks/dep-V3BH7oO1.js:38509:12)
    at _interpolate (file:///app/.yarn/__virtual__/vite-virtual-68526d8c1a/0/cache/vite-npm-5.0.11-d5457a8b86-74a3ddc6d4.zip/node_modules/vite/dist/node/chunks/dep-V3BH7oO1.js:38509:12)
    at _interpolate (file:///app/.yarn/__virtual__/vite-virtual-68526d8c1a/0/cache/vite-npm-5.0.11-d5457a8b86-74a3ddc6d4.zip/node_modules/vite/dist/node/chunks/dep-V3BH7oO1.js:38509:12)

1 Answer 1

0

I have found the root reason for this : When in devcontainer, make sure to not add in your .env file a variable then assign the same name to it :

API_TOKEN=${API_TOKEN}

This will cause the error inly in devcontainer in local it will work fine.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.