why does yarn nx g nrw…

less than 1 minute read

why does yarn nx g @nrwl/node:lib not yield a package.json file? yarn nx g @nrwl/react:library does yield one

Responses:

neither should if you dont include the --publishable flag

the react one does yield a package.json without it. just a name in it though

for some reason my package created with the node generator does not become available

am I missing a step after generating it?

it works with the package.json file that just contains a name

the package.json should only be used for building/publishing those libs. If you’re using those libs within your code, the tsconfig.json path mapping should be used by the IDE and builds

{ "extends": "../../tsconfig.json", "compilerOptions": { "types": ["node", "jest"] }, "include": ["**/*.ts"] }

root one

aha, I see

do I need to run a process for the IDE to pick it up?

no, it should be automatic - if not just kick it to restart it

let me see if that worked

yeah that worked!

Updated: