Skip to content
This repository has been archived by the owner on Apr 1, 2023. It is now read-only.

Error running npm install for example folder for [email protected] #366

Open
patel-prince opened this issue Feb 28, 2022 · 5 comments
Open

Comments

@patel-prince
Copy link

× Running npm install in example directory
Error: Command failed with exit code 1: npm install
npm ERR! code 1
npm ERR! path D:\github\kreattix-design\node_modules\typescript
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c gulp build-eslint-rules
npm ERR! 'gulp' is not recognized as an internal or external command,
npm ERR! operable program or batch file.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\prpat\AppData\Local\npm-cache_logs\2022-02-28T13_05_00_134Z-debug-0.log
at makeError (C:\Users\prpat\AppData\Local\npm-cache_npx\590ca40916156f54\node_modules\execa\lib\error.js:59:11)
at handlePromise (C:\Users\prpat\AppData\Local\npm-cache_npx\590ca40916156f54\node_modules\execa\index.js:114:26)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async pEachSeries (C:\Users\prpat\AppData\Local\npm-cache_npx\590ca40916156f54\node_modules\p-each-series\index.js:8:23) {
shortMessage: 'Command failed with exit code 1: npm install',
command: 'npm install',
exitCode: 1,
signal: undefined,
signalDescription: undefined,
stdout: '',
stderr: 'npm ERR! code 1\n' +
'npm ERR! path D:\github\kreattix-design\node_modules\typescript\n' +
'npm ERR! command failed\n' +
'npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c gulp build-eslint-rules\n' +
"npm ERR! 'gulp' is not recognized as an internal or external command,\n" +
'npm ERR! operable program or batch file.\n' +
'\n' +
'npm ERR! A complete log of this run can be found in:\n' +
'npm ERR! C:\Users\prpat\AppData\Local\npm-cache\_logs\2022-02-28T13_05_00_134Z-debug-0.log',
failed: true,
timedOut: false,
isCanceled: false,
killed: false
}

@shaungt1
Copy link

shaungt1 commented Mar 8, 2022

I am also having this same issue when I select npm and typescript

@shaungt1
Copy link

shaungt1 commented Mar 8, 2022

If you would prefer to ignore this check, add SKIP_PREFLIGHT_CHECK=true to an .env file in your project.
That will permanently disable this message but you might encounter other issues.

To fix the dependency tree, try following the steps below in the exact order:

  1. Delete package-lock.json (not package.json!) and/or yarn.lock in your project folder.
  2. Delete node_modules in your project folder.
  3. Remove "babel-jest" from dependencies and/or devDependencies in the package.json file in your project folder.
  4. Run npm install or yarn, depending on the package manager you use.

In most cases, this should be enough to fix the problem.
If this has not helped, there are a few other things you can try:

  1. If you used npm, install yarn (http://yarnpkg.com/) and repeat the above steps with it instead.
    This may help because npm has known issues with package hoisting which may get resolved in future versions.

  2. Check if C:\Users\Frontside\node_modules\babel-jest is outside your project directory.
    For example, you might have accidentally installed something in your home folder.

  3. Try running npm ls babel-jest in your project folder.
    This will tell you which other package (apart from the expected react-scripts) installed babel-jest.

If nothing else helps, add SKIP_PREFLIGHT_CHECK=true to an .env file in your project.
That would permanently disable this preflight check in case you want to proceed anyway.

P.S. We know this message is long but please read the steps above :-) We hope you find them helpful!

I have completed and repeated these steps on fresh install sevral times

@josephh
Copy link

josephh commented Mar 14, 2022

Just tried https://github.com/transitive-bullshit/create-react-library too. Failed for me as i don't have gulp installed.
Should gulp be installed as part of your build scripts, or have i missed something?

@shaungt1
Copy link

shaungt1 commented Mar 14, 2022 via email

@xzessmedia
Copy link

xzessmedia commented Apr 12, 2022

only solution i found:
downgrade NPM.. is not a nice solution but this version is "only" 3 months old
https://www.npmjs.com/package/npm/v/6.14.16

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants