VulcanJS / Vulcan

🌋 A toolkit to quickly build apps with React, GraphQL & Meteor
http://vulcanjs.org
MIT License
7.98k stars 1.89k forks source link

objectSpread2 error after running unit test #2680

Open eric-burel opened 3 years ago

eric-burel commented 3 years ago

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.

ErikDakoda commented 3 years ago

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",
eric-burel commented 3 years ago

Still happens after updating to meteor v2