After yarn add yajson-stream in our non-typescript (babel) project, we got the following error when trying to use:
module.js:540
throw err;
^
Error: Cannot find module 'yajson-stream'
at Function.Module._resolveFilename (module.js:538:15)
at Function.Module._load (module.js:468:25)
at Module.require (module.js:587:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (.../aggregator/src/data/parse.js:3:14)
at Module._compile (module.js:643:30)
at loader (.../node_modules/babel-register/lib/node.js:144:5)
at Object.require.extensions.(anonymous function) [as .js] (.../node_modules/babel-register/lib/node.js:154:7)
at Module.load (module.js:556:32)
at tryModuleLoad (module.js:499:12)
I think this is because main.js is not getting included in the dist/ folder. When I change main.js to main.ts, it is detected by gulp and properly packaged -- I think this is the fix, but I'm not too sure.
After
yarn add yajson-stream
in our non-typescript (babel) project, we got the following error when trying to use:I think this is because
main.js
is not getting included in thedist/
folder. When I changemain.js
tomain.ts
, it is detected bygulp
and properly packaged -- I think this is the fix, but I'm not too sure.