esbuild-plugin-postcss icon indicating copy to clipboard operation
esbuild-plugin-postcss copied to clipboard

Path not found when importing from node_modules that in turn requires other modules

Open srconklin opened this issue 3 years ago • 1 comments

the require statement of normalize.css from within the suitcss-base project is looking for the dependency in the suitcss-base path INSTEAD of the root of node_modules. Can you advise on how to get past this?

X [ERROR] [plugin postcss] ENOENT: no such file or directory, open 'C:\Users\scott\Projects\cbi\node_modules\suitcss-base\normalize.css\normalize.css'

node_modules/suitcss-base/index.js:1:8: 1 │ require('normalize.css/normalize.css'); ╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This error came from the "onResolve" callback registered here:

node_modules/@deanc/esbuild-plugin-postcss/index.js:16:10: 16 │ build.onResolve( ╵ ~~~~~~~~~

srconklin avatar Dec 08 '22 03:12 srconklin

same here

frankyhung93 avatar Feb 09 '23 05:02 frankyhung93