Home > Mobile >  I'm using Yarnberry, but is the node_module file originally created when I proceed with "Y
I'm using Yarnberry, but is the node_module file originally created when I proceed with "Y

Time:10-17

enter image description here

I'm using Yarnberry, but is the node_module file originally created when I proceed with "Yarn start"?

I would like to proceed with the package management through Yarn-berry in the react project.

However, running 'yarn start' creates a node module file.

As far as I know, the package is managed in a zip archive form without a nodemodule file.

Is this normal?

CodePudding user response:

It's normal. Some packages (like Babel, which will be used to transpile newer language features to what the host runtime supports) use node_modules as a place to store temporary files they need to create. The .cache subfolder is a sort of defacto standard for library authors. Essentially, it is nothing to worry about.

It looks like the project uses pnp which is why there's nothing else in node_modules. With PNP, the third-party packages themselves are not copied into node_modules like in the classical approach to NPM package management. But caches are an exception to this rule, which is probably why it looks strange it's just that there. But it's not an issue.

You should ignore the whole node_modules folder from your version control system (e.g. GIT).

  • Related