Error: TypeError: ‘process.env’ only accepts a configurable whileinstall windows-build-tools

I had the exact same problem. First I tried to do npm install –global –production [email protected] but didn’t work then npm config set msvs_version 2022 but still didn’t work. Finally I tried to download node version 17.9.1 and retried the command and it worked!! So here are the steps: Step 1: uninstall Node version 18.12 … Read more

How do I set a peer dependency optional?

Since NPM v7.x, you can use the peerDependenciesMeta package.json config, which allows exactly that option. For example, in your “Module A” package.json: “peerDependencies”: { “winston”: “> 1.0.0 <= 1.2.10”, “foo”: “~2.3.0” }, “peerDependenciesMeta”: { “winston”: { “optional”: true } } In this case, when installing Module A as a dependency of another project, it will … Read more

Error npm is known not to run on Node.js v10.24.1 and how to fix it, don’t update to the latest version?

The problem for me was upgrading my global version of npm while on an incompatible version of Node (8.16.1). I tried to uninstall npm globally but that also didn’t work because I could not use the npm command. To fix it, I used nvm to switch to a compatible version of Node (nvm use 14.0.0 … Read more

Solve having more than one copy of React in the same app

In the module you are developing, add the conflicting packages to peerDependencies (and remove them from dependencies or devDependencies): // package.json “peerDependencies”: { “react”: “16.13.1”, “react-dom”: “16.13.1” }, Execute npm install in your module. Now add react and react-dom to the webpack configuration of your module as externals. These packages shouldnt be included in the … Read more

How can I use “exports” in package.json for nested submodules and TypeScript?

Node.js has supported exports since v12.7.0 (Jul. 2019) When I asked this question (Dec. 2021), NodeJS had supported the exports field for nearly 2.5 years. It seemed reasonable to assume that Typescript supported it. The latest version of TypeScript at that time (4.5) did not support the exports field. This was particularly confusing because the … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)