Module not found: Error: cannot resolve "file" or "directory" ./ dist / qs.js

I use the webpack and history (1.13.0) library for react-routerboth npm dependency. When I create a project, I get an error:

Module not found: Error: Cannot resolve 'file' or 'directory' ./dist/qs.js in /Users/and/p/node_modules/history/node_modules/qs

In package.json , qs is the main file lib/index.js, but in bower.json dist/qs.js .

As .../history/node_modules/qsI do not have the dist folder .

I am not sure if this is a problem, but now I can’t use the history module without manually changing the path of the main bower.json file of the qs project.

+4
source share
1

bower-webpack .

, , - bower.json lib/index.js qs .

0

Source: https://habr.com/ru/post/1614277/


All Articles