Closed frouo closed 2 years ago
on it daaaawg 🐕
all done - running tests on each change is kind of overkill. Setting up some pre-push githooks might be a better solution.
Re-opened: NPM published package once installed in the project is not working (with error Error: Directory import '/Users/frouo/Programming/Lembot/app/node_modules/next-markdown/dist/utils' is not supported resolving ES modules imported from/Users/frouo/Programming/Lembot/app/node_modules/next- markdown/dist/index.is
cf. screenshot below).
Attempted to fix this with #10 & #11 but where it fixes something here and breaks somewhere else...
Please, help.
Problem
Right now I have no proper solution:
npm link
but, for every changes innext-markdown/src/index.ts
, I need to executecd examples/blogging && rm -rf node_modules/next-markdown && npm link
. Very painful.next-markdown/src/index.ts
and use it locally in an example, so when I am done, I copy/paste back tonext-markdown/src
. Very painful and ugly...next-markdown
function (eg.export getNextmdFromFilePath = (..)=>{..}
) butimport { getNextmdFromFilePath } from '../';
in file__tests__/index.test.ts
failed with errorModule '"../index"' has no exported member 'getNextmdFromFilePath'
Wanted
I don't have the time (and knowledge yet) to setup properly the project this way:
next-markdown/src/index.ts
changes, tests are rannext-markdown/src/index.ts
changes, the project updatesnext-markdown/src/utility.ts
the published npm library does not work (module not found)Thank you
Any help is much than appreciated 🙏