Vulcan icon indicating copy to clipboard operation
Vulcan copied to clipboard

objectSpread2 error after running unit test

Open eric-burel opened this issue 3 years ago • 2 comments

Describe the bug When running unit test, and then running the app, we get: Error: Cannot find module '/code/lfg/Vulcan/.meteor/local/build/programs/server/node_modules/@babel/runtime/helpers/objectSpread2' We need to reinstall meteor npm i @babel/runtime@latest so the app run again.

To Reproduce On Vulcan devel branch: meteor npm run test-unit meteor npm run start

Expected behavior

The start should work after tests are run. It seems that the test mode install an old version of @babel/runtime, so we need to reinstall the latest version everytime we want to start the normal app again.

eric-burel avatar Jan 20 '21 19:01 eric-burel

The same thing happens to me as well when I run unit tests on my own codebase. It is very strange and annoying. I have done some digging in the past and I couldn't find any discussions or solutions online.

I have resolved to not stress about it for now. I have added a script to my package.json that I run when I finish a unit testing session:

"meteor:repair": "meteor npm install meteor-node-stubs@latest @babel/runtime@latest --save",

ErikDakoda avatar Jan 22 '21 13:01 ErikDakoda

Still happens after updating to meteor v2

eric-burel avatar Mar 09 '21 14:03 eric-burel