This repository was archived by the owner on Aug 26, 2021. It is now read-only.

Description
Bug Report
What happened
Some folders and files like lib, node_modules in package folder are in .gitignore, so when you switch branches these folders stays on place. When you collect folders(e.g. modules) for further usage these "empty" module also gets into result. This provides an error when you try to require package.json from it.
Error: Cannot find module '/var/www/github/design-system-components/packages/file-upload/package.json'
at Function.Module._resolveFilename (module.js:555:15)
at Function.Module._load (module.js:482:25)
at Module.require (module.js:604:17)
at require (internal/module.js:11:18)
at Object.json (/var/www/github/design-system-components/scripts/helper.js:642:26)
at Object.init (/var/www/github/design-system-components/scripts/helper.js:625:20)
at Object.HELPER.init (/var/www/github/design-system-components/scripts/helper.js:1233:19)
at Object.<anonymous> (/var/www/github/design-system-components/scripts/helper.js:1254:8)
at Module._compile (module.js:660:30)
at Object.Module._extensions..js (module.js:671:10)
What I expected to happen
No error :)
Reproducing
- Module name: scripts/helper.js
Steps to reproduce:
- Checkout new branch
- Init, build and commit new component
- Switch back
cd into the any existing package folder
- run
npm run watch