You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am getting these quite cryptic error message when trying your mocha runner and I assume it might be due to the file directory layout of my project.
The relevant bits of my NPM scripts look like this:
dev:app1
vite -c code/app1/vite.config.ts code/app1
dev:app2
vite -c code/app2/vite.config.ts code/app2
test
mocha -- --reporter mocha-teamcity-reporter --recursive code/app1/test/ --timeout 5000
So I have basically two apps sharing the same node_modules folder, with their separate setups. If I try to launch your tool from a sub-directory like code/app1 I just get this error:
$ npx mocha-vite-puppeteer
✔ Install the following package: mocha-vite-puppeteer@latest? (Y/n) · true
Packages: +186
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Packages are hard linked from the content-addressable store to the virtual store.
Content-addressable store is at: /home/my-user/.pnpm-store/v3
Virtual store is at: node_modules/.pnpm
Progress: resolved 202, reused 162, downloaded 34, added 186, done
node_modules/.pnpm/[email protected]/node_modules/esbuild: Running postinstall script, done in 48ms
node_modules/.pnpm/[email protected]/node_modules/puppeteer: Running install script, done in 92ms
/home/my-user/.pnpm-store/v3/tmp/_npx/29559/5:
+ mocha-vite-puppeteer 2.0.0
Pre-bundling dependencies:
dayjs/locale/nb
dayjs
react
react-dom
tcomb/lib/installTypeFormatter
(...and 192 more)
(this will be run only when your dependencies or config have changed)
[vite] connecting...
[vite] connected.
16:04:07 [vite] new dependencies found: chai, proxyquire, sinon, sinon-chai, @sinonjs/fake-timers, enzyme-to-json, redux-mock-store, tcomb-validation, @testing-library/react, @testing-library/dom, enzyme, updating...
16:04:08 [vite] Failed to load source map for /@fs/home/my-user/dev/my-project/frontend/node_modules/.vite/chunk-6MRIKF33.js?v=54d1b7f1.
16:04:08 [vite] Failed to load source map for /@fs/home/my-user/dev/my-project/frontend/node_modules/.vite/chunk-I3LIQQ36.js?v=54d1b7f1.
16:04:08 [vite] Failed to load source map for /@fs/home/my-user/dev/my-project/frontend/node_modules/.vite/chunk-CUDBNUXQ.js?v=54d1b7f1.
16:04:08 [vite] Failed to load source map for /@fs/home/my-user/dev/my-project/frontend/node_modules/.vite/chunk-APW4DFJS.js?v=54d1b7f1.
Sourcemap for "/home/my-user/dev/my-project/frontend/node_modules/.pnpm/[email protected]/node_modules/tcomb-additional-types/lib/string/index.js" points to missing source files
Sourcemap for "/home/my-user/dev/my-project/frontend/node_modules/.pnpm/[email protected]/node_modules/ts-is-present/lib/index.js" points to missing source files
16:04:10 [vite] ✨ dependencies updated, reloading page...
file:///home/my-user/.pnpm-store/v3/tmp/_npx/29559/5/node_modules/.pnpm/[email protected]/node_modules/mocha-vite-puppeteer/cli.js:126
throw new Error(request.url() + ' ' + request.failure().errorText);
^
Error: http://localhost:3001/test/utils/examinations-logic/summaries/weight-summary.test.js net::ERR_ABORTED
at file:///home/my-user/.pnpm-store/v3/tmp/_npx/29559/5/node_modules/.pnpm/[email protected]/node_modules/mocha-vite-puppeteer/cli.js:126:11
at /home/my-user/.pnpm-store/v3/tmp/_npx/29559/5/node_modules/.pnpm/[email protected]/node_modules/puppeteer/lib/cjs/vendor/mitt/src/index.js:51:62
at Array.map (<anonymous>)
at Object.emit (/home/my-user/.pnpm-store/v3/tmp/_npx/29559/5/node_modules/.pnpm/[email protected]/node_modules/puppeteer/lib/cjs/vendor/mitt/src/index.js:51:43)
at Page.emit (/home/my-user/.pnpm-store/v3/tmp/_npx/29559/5/node_modules/.pnpm/[email protected]/node_modules/puppeteer/lib/cjs/puppeteer/common/EventEmitter.js:72:22)
at /home/my-user/.pnpm-store/v3/tmp/_npx/29559/5/node_modules/.pnpm/[email protected]/node_modules/puppeteer/lib/cjs/puppeteer/common/Page.js:153:106
at /home/my-user/.pnpm-store/v3/tmp/_npx/29559/5/node_modules/.pnpm/[email protected]/node_modules/puppeteer/lib/cjs/vendor/mitt/src/index.js:51:62
at Array.map (<anonymous>)
at Object.emit (/home/my-user/.pnpm-store/v3/tmp/_npx/29559/5/node_modules/.pnpm/[email protected]/node_modules/puppeteer/lib/cjs/vendor/mitt/src/index.js:51:43)
at NetworkManager.emit (/home/my-user/.pnpm-store/v3/tmp/_npx/29559/5/node_modules/.pnpm/[email protected]/node_modules/puppeteer/lib/cjs/puppeteer/common/EventEmitter.js:72:22)
I seem to recollect that I got this working the last time I tried in August, but then I was deep into Vite internals (to figure out how to do module mocking), all of which is long gone. Any pointers?
The text was updated successfully, but these errors were encountered:
I am getting these quite cryptic error message when trying your mocha runner and I assume it might be due to the file directory layout of my project.
The relevant bits of my NPM scripts look like this:
So I have basically two apps sharing the same node_modules folder, with their separate setups. If I try to launch your tool from a sub-directory like
code/app1
I just get this error:I seem to recollect that I got this working the last time I tried in August, but then I was deep into Vite internals (to figure out how to do module mocking), all of which is long gone. Any pointers?
The text was updated successfully, but these errors were encountered: