NPM: After “npm link” module is not found

后端 未结 10 885
情深已故
情深已故 2021-02-11 11:31

I\'m developing two modules for NodeJS, first one named aligator and second one aligator-methods. Second one depends on first one to work. I\'m develop

10条回答
  •  不知归路
    2021-02-11 12:18

    Check tsconfig moduleResolution

    If like me, you happened to change the tsconfig module from es5 to esnext or something, then the moduleResolution default may have changed.

    Without moduleResolution being set to "node", typescript will not resolve node_modules packages.

    You can read on the Compiler Options page about how the default value depends on the value of module, whose default in turn depends on target — but probably set it to "node" explicitly.

提交回复
热议问题