yarn install node-sass problem on macOS 12.4 - reactjs

I cannot install all dependencies for my React project. I am using macOS 12.4, node version is v17.6.0, npm version is 8.5.1 and finally yarn version is 1.22.19.
I am getting this error when I type 'yarn' in terminal:
2 warnings generated.
rm -f Release/sass.a && ./gyp-mac-tool filter-libtool libtool -static -o Release/sass.a Release/obj.target/libsass/src/libsass/src/ast.o Release/obj.target/libsass/src/libsass/src/ast_fwd_decl.o Release/obj.target/libsass/src/libsass/src/backtrace.o Release/obj.target/libsass/src/libsass/src/base64vlq.o Release/obj.target/libsass/src/libsass/src/bind.o Release/obj.target/libsass/src/libsass/src/cencode.o Release/obj.target/libsass/src/libsass/src/check_nesting.o Release/obj.target/libsass/src/libsass/src/color_maps.o Release/obj.target/libsass/src/libsass/src/constants.o Release/obj.target/libsass/src/libsass/src/context.o Release/obj.target/libsass/src/libsass/src/cssize.o Release/obj.target/libsass/src/libsass/src/emitter.o Release/obj.target/libsass/src/libsass/src/environment.o Release/obj.target/libsass/src/libsass/src/error_handling.o Release/obj.target/libsass/src/libsass/src/eval.o Release/obj.target/libsass/src/libsass/src/expand.o Release/obj.target/libsass/src/libsass/src/extend.o Release/obj.target/libsass/src/libsass/src/file.o Release/obj.target/libsass/src/libsass/src/functions.o Release/obj.target/libsass/src/libsass/src/inspect.o Release/obj.target/libsass/src/libsass/src/json.o Release/obj.target/libsass/src/libsass/src/lexer.o Release/obj.target/libsass/src/libsass/src/listize.o Release/obj.target/libsass/src/libsass/src/memory/SharedPtr.o Release/obj.target/libsass/src/libsass/src/node.o Release/obj.target/libsass/src/libsass/src/operators.o Release/obj.target/libsass/src/libsass/src/output.o Release/obj.target/libsass/src/libsass/src/parser.o Release/obj.target/libsass/src/libsass/src/plugins.o Release/obj.target/libsass/src/libsass/src/position.o Release/obj.target/libsass/src/libsass/src/prelexer.o Release/obj.target/libsass/src/libsass/src/remove_placeholders.o Release/obj.target/libsass/src/libsass/src/sass.o Release/obj.target/libsass/src/libsass/src/sass2scss.o Release/obj.target/libsass/src/libsass/src/sass_context.o Release/obj.target/libsass/src/libsass/src/sass_functions.o Release/obj.target/libsass/src/libsass/src/sass_util.o Release/obj.target/libsass/src/libsass/src/sass_values.o Release/obj.target/libsass/src/libsass/src/source_map.o Release/obj.target/libsass/src/libsass/src/subset_map.o Release/obj.target/libsass/src/libsass/src/to_c.o Release/obj.target/libsass/src/libsass/src/to_value.o Release/obj.target/libsass/src/libsass/src/units.o Release/obj.target/libsass/src/libsass/src/utf8_string.o Release/obj.target/libsass/src/libsass/src/util.o Release/obj.target/libsass/src/libsass/src/values.o
env: python: No such file or directory
make: *** [Release/sass.a] Error 127
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/Users/macbook/VSCode/business-front/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack at ChildProcess.emit (node:events:527:28)
gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
gyp ERR! System Darwin 21.5.0
gyp ERR! command "/Users/macbook/.nvm/versions/node/v17.6.0/bin/node" "/Users/macbook/VSCode/business-front/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /Users/macbook/VSCode/business-front/node_modules/node-sass
gyp ERR! node -v v17.6.0
My package.json:
{
"name": "business",
"version": "0.1.5",
"description": "Front-end service fo business",
"main": "index.js",
"repository": {
"type": "git",
"url": "git+https://github.com/egaranti/business-front.git"
},
"author": "eGaranti Devs",
"license": "ISC",
"bugs": {
"url": "https://github.com/business/business-front/issues"
},
"homepage": "www.google.com",
"private": true,
"dependencies": {
"#material-ui/core": "^4.12.3",
"#material-ui/lab": "^4.0.0-alpha.60",
"#testing-library/jest-dom": "^5.15.1",
"#testing-library/react": "^11.2.7",
"#testing-library/user-event": "^12.8.3",
"axios": "^0.24.0",
"dotenv": "^10.0.0",
"lodash": "^4.17.21",
"moment": "^2.29.1",
"node-sass": "^6.0.1",
"on-finished": "~2.3.0",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-range": "^1.8.13",
"react-redux": "^7.2.6",
"react-router-dom": "^5.2.0",
"react-scripts": "4.0.3",
"react-select-search": "^3.0.9",
"react-switch": "^6.0.0",
"redux": "^4.1.2",
"redux-devtools-extension": "^2.13.9",
"redux-thunk": "^2.4.1",
"uuid": "^8.3.2",
"validator": "^13.7.0",
"web-vitals": "^1.1.2"
},
"scripts": {
"start": "react-scripts start",
"prod": "serve -l 4001 -s build",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject",
"lint": "prettier --config .prettierrc \"src/**/*.js\" --write"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"devDependencies": {
"prettier": "^2.5.0",
"serve": "^13.0.2"
}
}
I tried to solve this problem by installing python3 and Xcode, but it didn't work for me. I didn't any problem for my Windows machine. How can I solve this or Anyone solve this?
SOLVED: I installed pyenv and also install python 2.7.18 using pyenv, then restart the terminal. It works!

Related

Unable to resolve dependency for installing html-parser

I am trying to install npm install react-html-parser in my current project. So I am trying to install the npm install react-html-parser but after I use the command.
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
PS D:\Ecommerce\user\ecom> npm install react-html-parser
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: ecom#0.1.0
npm ERR! Found: react#17.0.2
npm ERR! node_modules/react
npm ERR! react#"^17.0.2" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react#"^0.14.0 || ^15.0.0 || ^16.0.0-0" from react-html-parser#2.0.2
npm ERR! node_modules/react-html-parser
npm ERR! react-html-parser#"*" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See C:\Users\hp\AppData\Local\npm-cache\eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\hp\AppData\Local\npm-cache\_logs\2022-02-19T13_09_05_987Z-debug-0.log
Here is my package json file
{
"name": "ecom",
"version": "0.1.0",
"private": true,
"dependencies": {
"#testing-library/jest-dom": "^5.16.1",
"#testing-library/react": "^12.1.2",
"#testing-library/user-event": "^13.5.0",
"axios": "^0.26.0",
"bootstrap": "^5.1.3",
"is-buffer": "^2.0.5",
"react": "^17.0.2",
"react-bootstrap": "^2.1.1",
"react-dom": "^17.0.2",
"react-router": "^5.2.0",
"react-router-dom": "^5.2.0",
"react-router-transition": "^2.1.0",
"react-scripts": "5.0.0",
"react-slick": "^0.28.1",
"react-toastify": "^8.2.0",
"slick-carousel": "^1.8.1",
"web-vitals": "^2.1.3"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}
I don't understand what I can do. Please help me find the solution. Any sort of help would be appreciated. Thank you in advance.
Here is a solution I found in the following answer
The idea is to replace react-html-parser with html-react-parser.
import parse from "html-react-parser";
...
{parse("<HTML string>")}
...
The last release for react-html-parser seems to be from 4 years ago.
If you do not need anything specifically from React version 17, I would go with version 16 in your situation if you really want to use react-html-parser in your project. Looking at the peer dependencies of the react-html-parser package tells us that it is not ok with react 17.
"peerDependencies": {
"react": "^0.14.0 || ^15.0.0 || ^16.0.0-0"
}
Here is a package.json file with the React and ReactDOM version changed accordingly. To keep it simple.
{
"name": "ecom",
"version": "0.1.0",
"private": true,
"dependencies": {
"#testing-library/jest-dom": "^5.16.1",
"#testing-library/react": "^12.1.2",
"#testing-library/user-event": "^13.5.0",
"axios": "^0.26.0",
"bootstrap": "^5.1.3",
"is-buffer": "^2.0.5",
"react": "^16.8.0",
"react-bootstrap": "^2.1.1",
"react-dom": "^16.14.0",
"react-html-parser": "^2.0.2",
"react-router": "^5.2.0",
"react-router-dom": "^5.2.0",
"react-router-transition": "^2.1.0",
"react-scripts": "5.0.0",
"react-slick": "^0.28.1",
"react-toastify": "^8.2.0",
"slick-carousel": "^1.8.1",
"web-vitals": "^2.1.3"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}
You could also use the --force flag when you run npm install if you really want React 17 and html-react-parser together with the recommended protections disabled.
npm install react-html-parser --force
Instead of using react-html-parser, why don't you use html-react-parser ?
react-html-parser updated 5 years ago, I think something in the body doesn't "match" with current version of react. hmtl-react-parser is updated 7 days ago.
I have faced the same problem with react version "react": "^18.1.0",
I Have Solved the issue using
npm install react-html-parser --legacy-peer-deps .

struggling to install node-sass in react-app

It all began after installing locomotive-scroll. I have been trying to install node-sass in my react app. I tried npm install node-sass but I got an error ERR_SOCKET_TIMEOUT I can't even run npm start command, it gives these errors
./node_modules/locomotive-scroll/src/locomotive-scroll.scss (./node_modules/css-loader/dist/cjs.js??ref--6-oneOf-5-1!./node_modules/postcss-loader/src??postcss!./node_modules/resolve-url-loader??ref--6-oneOf-5-3!./node_modules/sass-loader/dist/cjs.js??ref--6-oneOf-5-4!./node_modules/locomotive-scroll/src/locomotive-scroll.scss)
To import Sass files, you first need to install node-sass.
Run `npm install node-sass` or `yarn add node-sass` inside your workspace.
Require stack:
- C:\Users\Noname\Desktop\react js\vertical-portfolio\react-app\node_modules\sass-loader\dist\getDefaultSassImplementation.js
- C:\Users\Noname\Desktop\react js\vertical-portfolio\react-app\node_modules\sass-loader\dist\getSassImplementation.js
- C:\Users\Noname\Desktop\react js\vertical-portfolio\react-app\node_modules\sass-loader\dist\index.js
- C:\Users\Noname\Desktop\react js\vertical-portfolio\react-app\node_modules\sass-loader\dist\cjs.js
- C:\Users\Noname\Desktop\react js\vertical-portfolio\react-app\node_modules\loader-runner\lib\loadLoader.js
- C:\Users\Noname\Desktop\react js\vertical-portfolio\react-app\node_modules\loader-runner\lib\LoaderRunner.js
- C:\Users\Noname\Desktop\react js\vertical-portfolio\react-app\node_modules\webpack\lib\NormalModule.js
- C:\Users\Noname\Desktop\react js\vertical-portfolio\react-app\node_modules\webpack\lib\NormalModuleFactory.js
- C:\Users\Noname\Desktop\react js\vertical-portfolio\react-app\node_modules\webpack\lib\Compiler.js
- C:\Users\Noname\Desktop\react js\vertical-portfolio\react-app\node_modules\webpack\lib\webpack.js
- C:\Users\Noname\Desktop\react js\vertical-portfolio\react-app\node_modules\react-scripts\scripts\start.js
I tried npm cache clean, npm audit fix, then tried with --force both of them. Deleted node_modules, run npm install, updated all packages with ncu -u. I tried npm clean cache, but it didn't work too.
Here is my package.json
{
"name": "react-app",
"version": "0.1.0",
"private": true,
"dependencies": {
"#testing-library/jest-dom": "^5.14.1",
"#testing-library/react": "^12.1.2",
"#testing-library/user-event": "^13.4.2",
"emailjs-com": "^3.2.0",
"framer-motion": "^4.1.17",
"gsap": "^3.8.0",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-gsap": "^3.2.1",
"react-icons": "^4.3.1",
"react-loading": "^2.0.3",
"react-locomotive-scroll": "^0.2.0",
"react-router-dom": "^5.3.0",
"react-scripts": "^4.0.3",
"react-scroll": "^1.8.4",
"styled-components": "^5.3.1",
"use-in-view": "^1.0.15",
"web-vitals": "^2.1.2"
},
"scripts": {
"predeploy": "npm run build",
"deploy": "gh-pages -d build",
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"devDependencies": {
"gh-pages": "^3.2.3"
}
}
So, node-sass is deprecated.
I'd like to think replacing node-sass with sass will solve your issue.
You should replace it by doing:
npm rm node-sass
npm i sass
If the project still throws errors, or demands/requires you install node-sass during runtime, try creating an alias in package.json that points to sass to bypass that error:
"node-sass": "npm:sass#^1.54.4"

React: Invalid hook call error and Framer Motion issue

I am having a "Error: Invalid hook call. " issue after installing and using Framer-Motion. So I followed the debugging strategy from the React.js(https://reactjs.org/warnings/invalid-hook-call-warning.html) docs and the only thing that I see that might be causing this issue is last part before "Other Causes" where it talks about React Router Link.
here is the code to two files that caused this issue. Package.json file from outside the "client" directory (for the server):
"main": "server.js",
"scripts": {
"start": "if-env NODE_ENV=production && npm run start:prod || npm run start:dev",
"start:prod": "node server.js",
"start:dev": "concurrently \"nodemon --ignore 'client/*'\" \"npm run client\"",
"client": "cd client && npm run start",
"install": "cd client && npm install",
"build": "cd client && npm run build",
"heroku-postbuild": "npm run build"
},
"repository": {
"type": "git",
"url": "git+https://github.com/MrDawit/Portafoglio_react.git"
},
"author": "",
"license": "Apache-2.0",
"bugs": {
"url": "https://github.com/MrDawit/Portafoglio_react/issues"
},
"homepage": "",
"dependencies": {
"#popperjs/core": "^2.9.2",
"bcryptjs": "^2.4.3",
"body-parser": "^1.19.0",
"bootstrap": "^4.6.0",
"concurrently": "^5.3.0",
"cookie-parser": "^1.4.5",
"core-js": "^3.15.2",
"cors": "^2.8.5",
"dotenv": "^8.2.0",
"express": "^4.17.1",
"framer-motion": "^4.1.17",
"googleapis": "^67.0.0",
"if-env": "^1.0.4",
"nodemailer": "^6.4.17",
"nodemon": "^2.0.7",
"react": "^17.0.1",
"react-bootstrap": "^1.4.3",
"react-dom": "^17.0.1",
"run-all": "^1.0.1"
},
"devDependencies": {
"gh-pages": "^3.1.0"
}
And here is the code from the Package.json file inside the "client" directory for React:
"dependencies": {
"#testing-library/jest-dom": "^5.11.9",
"#testing-library/react": "^11.2.3",
"#testing-library/user-event": "^12.6.0",
"axios": "^0.21.1",
"gh-pages": "^3.1.0",
"http-proxy-middleware": "^1.0.6",
"nodemailer": "^6.4.17",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"react-router-dom": "^5.2.0",
"react-scripts": "4.0.1",
"web-vitals": "^0.2.4"
},
"scripts": {
"predeploy": "npm run build",
"deploy": "gh-pages -d build",
"start": "set Port=3080 && react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
The issue ended up being that Framer Motion was supposed to be in the package.json file that is inside the "client" directory. Since Bootstrap and other similar modules were included in the outer package.json file and they installed correctly, it mislead me thinking that Framer Motion could do the same.
Steps for fixing my issue:
npm uninstall framer-motion
deleting both node_modules(inside and outside the "client" directory) directories
deleting both package-lock.json files
npm install
cd client
npm install framer-motion
Not doing step 5 in the first place was the cause of my error.

React application npm error code ELIFECYCLE

Getting below in my react application. I have tried reinstallation of node_module, setting
environment variable C:\Windows\System32
{
"name": "my_app",
"version": "0.1.0",
"private": true,
"dependencies": {
"#testing-library/jest-dom": "^4.2.4",
"#testing-library/react": "^9.5.0",
"#testing-library/user-event": "^7.2.1",
"bootstrap": "^4.5.2",
"bootstrap-social": "^5.1.1",
"font-awesome": "^4.7.0",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-popper": "^2.2.3",
"react-redux": "^7.2.1",
"react-router-dom": "^5.2.0",
"react-scripts": "3.4.1",
"reactstrap": "^8.5.1",
"redux": "^4.0.5"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": "react-app"
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"description": "This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).",
"devDependencies": {
"#babel/core": "^7.4.0",
"#babel/preset-env": "^7.4.2",
"#babel/preset-react": "^7.0.0",
"babel-loader": "^8.0.5",
"css-loader": "^2.1.1",
"html-loader": "^0.5.5",
"html-webpack-plugin": "^3.2.0",
"lite-server": "^2.5.4",
"react": "^16.8.5",
"react-dom": "^16.8.5",
"style-loader": "^0.23.1",
"webpack": "^4.42.0",
"webpack-cli": "^3.3.0",
"webpack-dev-server": "^3.2.1"
}
}
this.htmlWebpackPlugin.getHooks is not a function
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! my_app#0.1.0 start: react-scripts start
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the my_app#0.1.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\User\AppData\Roaming\npm-cache_logs\2020-08-13T02_51_42_849Z-debug.log
This happens sometimes when there are some files cached.
You can follow the following steps to solve it:
Clear the cache. We use the --force flag to do it forcefully.
$ npm cache clean --force
Delete the node_modules folder and package-lock.json file. You could do that by navigating to the project folder or using the following command:
$ rm -rf node_modules && rm package-lock.json
NOTE: Be very careful using the -rf command in the linux based terminal. Make sure you are in the right directory to use this command.
In Windows: $ rm -r "node_modules" in the powershell.
Install the node dependecies
$ npm install
This should solve the problem for you. If it still persist, then see what the error in the console says and try to solve that. It might be due to some other reason. :)

Issue with use of env-cmd in react application

System:
OS: Windows 10
IDE: Visual Studio Code
I'm working on a react application which contains below package.json
{
"name": "test-app",
"version": "0.1.0",
"private": true,
"dependencies": {
"animakit-expander": "^2.1.4",
"animakit-rotator": "^2.1.3",
"axios": "^0.19.0",
"circular-json": "^0.5.9",
"env-cmd": "^10.0.1",
"file-saver": "^2.0.2",
"jquery": "^3.4.1",
"jsonwebtoken": "^8.5.1",
"jszip": "^3.2.2",
"mdbreact": "^4.22.1",
"rc-queue-anim": "^1.8.2",
"react": "^16.12.0",
"react-dom": "^16.12.0",
"react-if-elseif-else-render": "^1.0.2",
"react-lazylog": "^4.4.1",
"react-loading-overlay": "^1.0.1",
"react-native-orientation-loading-overlay": "^0.1.6",
"react-overlay-loader": "0.0.3",
"react-overlay-loading": "^1.0.3",
"react-scripts": "3.2.0",
"react-scrollbar": "^0.5.6",
"react-transition-group": "^4.3.0",
"reactjs-popup": "^1.5.0",
"reactstrap": "^8.1.1",
"velocity-react": "^1.4.3"
},
"scripts": {
"start": "env-cmd -f ./.env.dev react-scripts start",
"start-dev": "env-cmd -f ./.env.dev react-scripts start",
"test": "react-scripts test --coverage",
"eject": "react-scripts eject",
"build": "react-scripts build",
"start1": "react-scripts start"
},
"eslintConfig": {
"extends": "react-app"
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}
When I run the command in the terminal, npm run start, I'm facing below issue:
> test-app#0.1.0 start C:\dev\test-app
> env-cmd -f ./.env.dev react-scripts start
'-f' is not recognized as an internal or external command,
operable program or batch file.
spawn -f ENOENT
internal/process/per_thread.js:189
throw errnoException(err, 'kill');
^
Error: kill ENOSYS
at process.kill (internal/process/per_thread.js:189:13)
at TermSignals._terminateProcess (C:\dev\test-app\node_modules\env-cmd\dist\signal-termination.js:47:28)
at process.terminateSpawnedProcessFuncHandlers.<computed> (C:\dev\test-app\node_modules\env-cmd\dist\signal-termination.js:20:30)
at Object.onceWrapper (events.js:300:26)
at process.emit (events.js:210:5)
at process.exit (internal/process/per_thread.js:158:15)
at TermSignals._uncaughtExceptionHandler (C:\dev\test-app\node_modules\env-cmd\dist\signal-termination.js:68:17)
at process.<anonymous> (C:\dev\test-app\node_modules\env-cmd\dist\signal-termination.js:40:53)
at process.emit (events.js:210:5)
at process._fatalException (internal/process/execution.js:150:25) {
errno: 'ENOSYS',
code: 'ENOSYS',
syscall: 'kill'
}
npm ERR! code ELIFECYCLE
npm ERR! errno 7
npm ERR! test-app#0.1.0 start: `env-cmd -f ./.env.dev react-scripts start`
npm ERR! Exit status 7
npm ERR!
npm ERR! Failed at the test-app#0.1.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\me\AppData\Roaming\npm-cache\_logs\2020-01-09T07_15_50_457Z-debug.log
and where as, when I run env-cmd -f ./.env.dev react-scripts start directly in any terminal, my application is working fine.
Please provide your suggestions.
Can you try placing the .env.dev file at the same folder level as package.json and try running the script by changing it to
env-cmd -f .env.dev react-scripts start

Resources