Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error creating project: Error: ENOENT: no such file or directory #37

Closed
adnaan opened this issue Jul 10, 2018 · 15 comments
Closed

Error creating project: Error: ENOENT: no such file or directory #37

adnaan opened this issue Jul 10, 2018 · 15 comments
Labels

Comments

@adnaan
Copy link

adnaan commented Jul 10, 2018

On executing, I get an error:

$ npx create-react-app test-app --scripts-version rmw-react-scripts
...
Success! Created test-app at /Users/adnaan/code/js/test-app
Inside that directory, you can run several commands:

  yarn start
    Starts the development server.

  yarn build
    Bundles the app into static files for production.

  yarn test
    Starts the test runner.

  yarn eject
    Removes this tool and copies build dependencies, configuration files
    and scripts into the app directory. If you do this, you can’t go back!

We suggest that you begin by typing:

  cd test-app
  yarn start

Happy hacking!
/Users/adnaan/code/js/test-app/node_modules/rmw-react-scripts/scripts/init.js:117
          throw err;
          ^

Error: ENOENT: no such file or directory, link '/Users/adnaan/code/js/test-app/functions/gitignore' -> '/Users/adnaan/code/js/test-app/functions/.gitignore'

Further :

$ cd test-app
$ yarn start
yarn run v1.7.0
warning ../../../package.json: No license field
$ react-scripts start
env: node\r: No such file or directory
error Command failed with exit code 127.

ENV :

 node -v
v8.11.1
 npm -v
5.6.0
yarn -v
1.7.0
@TarikHuber TarikHuber added the bug label Jul 10, 2018
@TarikHuber
Copy link
Collaborator

This should fix the bug: TarikHuber/create-react-app@0bd5817

Thx for the issue report 😄

@dholbrook86
Copy link

The issue doesn't seem to be fixed.
Clean install:

✨  Done in 7.84s.

Success! Created test-app at /Users/folder/test-app
Inside that directory, you can run several commands:

  yarn start
    Starts the development server.

  yarn build
    Bundles the app into static files for production.

  yarn test
    Starts the test runner.

  yarn eject
    Removes this tool and copies build dependencies, configuration files
    and scripts into the app directory. If you do this, you can’t go back!

We suggest that you begin by typing:

  cd test-app
  yarn start

Happy hacking!

More:

yarn run v1.7.0
$ react-scripts start
env: node\r: No such file or directory
error Command failed with exit code 127.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

ENV:

node -v
v8.11.3
npm -v
5.6.0
yarn -v
1.7.0

@TarikHuber
Copy link
Collaborator

Hi @dholbrook86 did you try it out with just npm?

@dholbrook86
Copy link

I think that's what I did the first time I tried it. Then I wiped it clean and tried yarn.
I can give it another shot.

@dholbrook86
Copy link

dholbrook86 commented Jul 18, 2018

I ran the installer then entered the directory and ran npm i

Here's the error:

> node-pre-gyp install --fallback-to-build --library=static_library

sh: node-pre-gyp: command not found
npm WARN fireform@0.2.13 requires a peer of firebase@4.x but none is installed. You must install peer dependencies yourself.
npm WARN firekit-provider@0.2.20 requires a peer of firekit@0.1.x || 0.2.x but none is installed. You must install peer dependencies yourself.
npm WARN firekit-provider@0.2.20 requires a peer of firebase@4.x but none is installed. You must install peer dependencies yourself.
npm WARN material-ui-filter@2.1.2 requires a peer of material-ui-pickers@1.x but none is installed. You must install peer dependencies yourself.
npm WARN material-ui-filter@2.1.2 requires a peer of muishift@1.x but none is installed. You must install peer dependencies yourself.
npm WARN material-ui-selectable-menu-list@1.19.5 requires a peer of material-ui@0.x but none is installed. You must install peer dependencies yourself.
npm WARN material-ui-selectable-menu-list@1.19.5 requires a peer of redux@3.x but none is installed. You must install peer dependencies yourself.
npm WARN material-ui-responsive-menu@1.19.3 requires a peer of material-ui@0.x but none is installed. You must install peer dependencies yourself.
npm WARN material-ui-responsive-menu@1.19.3 requires a peer of redux@3.x but none is installed. You must install peer dependencies yourself.
npm WARN material-ui-superselectfield@1.9.8 requires a peer of material-ui@>= 0.17 < 1 but none is installed. You must install peer dependencies yourself.
npm WARN material-ui-superselectfield@1.9.8 requires a peer of react@>= 15 < 16.3 but none is installed. You must install peer dependencies yourself.
npm WARN material-ui-superselectfield@1.9.8 requires a peer of react-dom@>= 15 < 16.3 but none is installed. You must install peer dependencies yourself.
npm WARN redux-form-material-ui@5.0.0-beta.2 requires a peer of react@15 but none is installed. You must install peer dependencies yourself.
npm WARN rmw-shell@4.0.5 requires a peer of material-ui-image@3.0.0-pre.7 but none is installed. You must install peer dependencies yourself.
npm WARN rmw-shell@4.0.5 requires a peer of material-ui-pickers@1.0.0-rc.7 but none is installed. You must install peer dependencies yourself.
npm WARN rmw-shell@4.0.5 requires a peer of muishift@1.x but none is installed. You must install peer dependencies yourself.
npm WARN react-tap-event-plugin@2.0.1 requires a peer of react@^15.4.0-0 but none is installed. You must install peer dependencies yourself.
npm WARN react-tap-event-plugin@2.0.1 requires a peer of react-dom@^15.4.0-0 but none is installed. You must install peer dependencies yourself.
npm WARN ajv-keywords@3.2.0 requires a peer of ajv@^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN eslint-config-standard-jsx@5.0.0 requires a peer of eslint@>=4.18.0 but none is installed. You must install peer dependencies yourself.
npm WARN eslint-config-standard-jsx@5.0.0 requires a peer of eslint-plugin-react@>=7.6.1 but none is installed. You must install peer dependencies yourself.
npm WARN eslint-config-standard@11.0.0 requires a peer of eslint@>=4.18.0 but none is installed. You must install peer dependencies yourself.

npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! grpc@1.11.3 install: `node-pre-gyp install --fallback-to-build --library=static_library`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the grpc@1.11.3 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

@TarikHuber TarikHuber reopened this Jul 18, 2018
@dholbrook86
Copy link

Thank you so much for your help @TarikHuber!

@TarikHuber
Copy link
Collaborator

Do you still have the problem? Have you tried it with this treath? grpc/grpc-node#121

@dholbrook86
Copy link

I was able to get it to work with the following steps.

npx create-react-app test-app --scripts-version rmw-react-scripts

cd test-app

npm install -g node-pre-gyp

npm i

npm start

The node-pre-gyp was tripping me up. I didn't have this globally installed.

@arvind-coder
Copy link

arvind-coder commented Oct 1, 2019

solve my problem

npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path F:\ReactProject\robofriends-redux-master\package.json
npm ERR! errno -4058
npm ERR! enoent ENOENT: no such file or directory, open 'F:\ReactProject\robofriends-redux-master\package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Lenovo\AppData\Roaming\npm-cache_logs\2019-10-01T07_27_00_817Z-debug.log

@venkateshece1105
Copy link

venkateshece1105 commented Dec 11, 2019

Anyone can Solve this issue,i tried many way from the same issues.kindly help me!!!!

events.js:187
throw er; // Unhandled 'error' event
^

Error: spawn cmd ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:264:19)
at onErrorNT (internal/child_process.js:456:16)
at processTicksAndRejections (internal/process/task_queues.js:80:21)
Emitted 'error' event on ChildProcess instance at:
at Process.ChildProcess._handle.onexit (internal/child_process.js:270:12)
at onErrorNT (internal/child_process.js:456:16)
at processTicksAndRejections (internal/process/task_queues.js:80:21) {
errno: 'ENOENT',
code: 'ENOENT',
syscall: 'spawn cmd',
path: 'cmd',
spawnargs: [ '/s', '/c', 'start', '""', '/b', '"http://localhost:3000/"' ]
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! project@0.1.0 start: react-scripts start
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the project@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\system8\AppData\Roaming\npm-cache_logs\2019-12-11T11_51_45_014Z-debug.log

@TarikHuber
Copy link
Collaborator

Can you try to install the original Creat React App without any custom template.

@Vipulgorana
Copy link

my app ran yesterday perfectly and then today I resume coding and boom I saw this same error !!

@bragamat
Copy link

bragamat commented Nov 1, 2020

I had a similar problema, solved with:

yarn global remove create-react-app

and then npx create-react-app my-app

@Abdvkh
Copy link

Abdvkh commented Jan 23, 2021

Also can use:
npm uninstall -g create-react-app

@yaminzan
Copy link

yaminzan commented May 3, 2021

only can run this commend line it will working
npm install -g node-pre-gyp

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

No branches or pull requests

9 participants