uidb-dev / react.cordova

best bundle to webApp mobile- react and cordova
67 stars 9 forks source link

reco init error #14

Closed steven-cheng closed 4 years ago

steven-cheng commented 4 years ago

I'm using the version 2.1.0

When using the 'reco init' to initialise the project, there are error messages both in the middle and at the end:

....... ---------reco start to build cordova-app---------

[Error: ENOENT: no such file or directory, scandir 'templates\empty'] { errno: -2, code: 'ENOENT', syscall: 'scandir', path: 'templates\\empty' } Creating a new cordova project. ......... run 'cd myapp' (node:43210) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, open 'package.json' (node:43210) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1) (node:43210) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

I run this on a Mac. And I notice that no this kind of problem occurs when I run it on Windows instead.

orchuban commented 4 years ago

@arkwld @arkadilu can you check it in your mac?

JaLe29 commented 4 years ago

Same for me.

I am getting an error Error: EPERM: operation not permitted, open './test/README.md' after reco init com.example.test "test"

orchuban commented 4 years ago

Same for me.

I am getting an error Error: EPERM: operation not permitted, open './test/README.md' after reco init com.example.test "test"

@JaLe29

What is your system?
How do you run the script? terminal?

JaLe29 commented 4 years ago

My system: windows 10, 64b., node: v12.16.0,

starting commands are same from doc (just with test instead of hello..):

npm install -g react.cordova
reco init com.example.test "test"
orchuban commented 4 years ago

@JaLe29 This package uses node.js for copying and editing files in a project. Your computer is blocking permissions. Search Google for "nodejs operation not permitted". Try something like this

Place share your solution insights here after that.

orchuban commented 4 years ago

@JaLe29
Let us know that you have been able to resolve the issue

steven-cheng commented 4 years ago

I've tried to start another project on my Mac now. But after about 3 months, the issue is still existed and the same.

orchuban commented 4 years ago

I've tried to start another project on my Mac now. But after about 3 months, the issue is still existed and the same. @steven-cheng

Please try npm i -g react.cordova@2.2.2 and let me know if it's work good now.

orchuban commented 4 years ago

I dedicate a considerable amount of my time to developing and maintaining this Cli, along with my other Open Source software. If you regularly use this CLI then please do not hesitate to donate, for quick support for your problems. Help me to support the CLI.

orchuban commented 4 years ago

@steven-cheng

Please try npm i -g react.cordova@2.2.2 and let me know if it's work good now.

steven-cheng commented 4 years ago

Nope, there is still some error as follows, after upgraded to 2.2.2 :

............

---------reco start to build cordova-app---------

[Error: ENOENT: no such file or directory, scandir 'templates\empty'] { errno: -2, code: 'ENOENT', syscall: 'scandir', path: 'templates\empty' } [Error: ENOENT: no such file or directory, scandir ''] { errno: -2, code: 'ENOENT', syscall: 'scandir', path: '' } Creating a new cordova project.

..................

NengakDakup commented 4 years ago

I think the fix for this is to run the command as an administrator, if you're on windows then run cmd as an admin, then for Ubuntu prefix your command with "sudo" Let me know if this helps anyone...

steven-cheng commented 4 years ago

Nope, still the same after I use "sudo" in my mac to elevate the rights.

orchuban commented 4 years ago

@steven-cheng , You need to change to administrator user before you use the cli commands. @arkwld , Please explain to Steven-cheng how to move the terminal to an administrator user in Mac.

orchuban commented 4 years ago

@JaLe29 Was your install command npm i -g react.cordova ? If not, uninstall and remove to cli files and install again with sudo npm -g react.cordova

orchuban commented 4 years ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days

steven-cheng commented 4 years ago

Is this the right command?

sudo reco init com.example.hello "hello world"

orchuban commented 4 years ago

@arkadilu

orchuban commented 4 years ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days