In the midst of my project, I have various sub projects - one of which is dedicated to JavaScript. My intention is to employ this JavaScript project as a task runner for the entire endeavor using gulp
. However, I've hit a snag in the process.
The layout of my project is structured like so:
root
|_
js-client
|_
package.json
|_
node_modules
|_
go-server
After research, I discovered that utilizing .yarnrc
allows me to designate an alternative location for node_modules
. As such, I relocated package.json
to the root
directory and crafted the following .yarnrc
file:
--modules-folder client/node_modules
Upon executing yarn install
from the root directory, modules were effectively installed in the designated location. Yet, upon running yarn build
, an error surfaced:
[09:46:17] Local modules not found in ~/Documents/Projects/root
[09:46:17] Try running: npm install
It appears that --modules-folder
only serves as a flag for install
and not for run
. Is it feasible to achieve what I desire, or should I create a distinct yarn project for task execution? I prefer not to rely on global settings to accomplish this.