You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm finding that I cannot import packages that have been installed in src/node_modules, I get 'module not found' errors. Installing these packages into the top level node_modules directory fixes the issue, but I think we should be able to have our non testing related packages only installed in the src/node_modules folder.
I'm not sure why webpack isn't finding this node_modules directory, as node should scan the tree for all available install locations right?
My workaround was to change the webpackConfig and explicitly list the node_modules directory in src as a root.
I'm finding that I cannot import packages that have been installed in src/node_modules, I get 'module not found' errors. Installing these packages into the top level node_modules directory fixes the issue, but I think we should be able to have our non testing related packages only installed in the src/node_modules folder.
I'm not sure why webpack isn't finding this node_modules directory, as node should scan the tree for all available install locations right?
My workaround was to change the webpackConfig and explicitly list the node_modules directory in src as a root.
var webpackConfig = {
resolve: {
root: [
path.join(wallaby.projectCacheDir, 'src'),
path.join(wallaby.localProjectDir, 'src','node_modules')
],
extensions: ['', '.js', '.jsx', '.json']
},
module: {
loaders: [
// JavaScript is handled by the Wallaby Babel compiler
{ test: /.json$/, loader: 'json-loader' }
]
}
};
Any ideas on if this is the correct approach here? If so should we make this change?
The text was updated successfully, but these errors were encountered: