How to fix "ENOENT: no such file or directory, chdir 'project-name'" when initializing a Vue Native project? - react-native

I'm trying:
vue-native init test-project
And I'm getting this output:
Using globally installed expo-cli 3.0.10
Creating Vue Native project project-new
Creating project with expo-cli
[09:09:29] --name: argument is required in non-interactive mode. √
Created project with expo-cli
(node:9072) UnhandledPromiseRejectionWarning: Error: ENOENT: no such
file or directory, chdir 'project-new'
at process.chdir (internal/process/main_thread_only.js:31:12)
at installPackages (C:\Users\User\AppData\Roaming\npm\node_modules\vue-native-cli\src\index.js:182:11)
at createExpoProject (C:\Users\User\AppData\Roaming\npm\node_modules\vue-native-cli\src\index.js:123:3)
at init (C:\Users\User\AppData\Roaming\npm\node_modules\vue-native-cli\src\index.js:101:5)
at Command. (C:\Users\User\AppData\Roaming\npm\node_modules\vue-native-cli\src\index.js:69:7)
at Command.listener (C:\Users\User\AppData\Roaming\npm\node_modules\vue-native-cli\node_modules\commander\index.js:315:8)
at Command.emit (events.js:182:13)
at Command.parseArgs (C:\Users\User\AppData\Roaming\npm\node_modules\vue-native-cli\node_modules\commander\index.js:651:12)
at Command.parse (C:\Users\User\AppData\Roaming\npm\node_modules\vue-native-cli\node_modules\commander\index.js:474:21)
at Object. (C:\Users\User\AppData\Roaming\npm\node_modules\vue-native-cli\src\index.js:81:9)
(node:9072) 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(). (rejection id: 1) (node:9072) [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've already installed React Native CLI, Expo CLI, and Vue Native CLI. I tried to solve the issue by updating npm but it did not work.
Also when I run:
vue-native init test-project --no-crna
it is ok and no errors appear.

Related

Gatsby website built but 'UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'split' of undefined at parseError' when opening localhost

My gatsby website was running locally without problems and when I tried to restart it today without updating the code, the npm run develop build succeeds. However, when I try to open localhost in browser, this error is thrown in the terminal:
success Building development bundle - 16.014s
success Writing page-data.json files to public directory - 0.103s - 3/11
106.93/s
(node:2043) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'split' of undefined
at parseError (/Users/sp/Documents/jamstack/training/frontend/node_modules/gatsby/src/utils/dev-ssr/render-dev-html-child.js:52:26)
at /Users/sp/Documents/jamstack/training/frontend/node_modules/gatsby/src/utils/dev-ssr/render-dev-html-child.js:106:27
at processTicksAndRejections (internal/process/task_queues.js:95:5)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:2043) 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 rejeæction, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:2043) [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 can't seem to work out where this error is coming from as I did not change any of the code that was working earlier.
Does anyone have an idea?
There's no detail about the running version of Gatsby but according to this GitHub thread, while the issue is being fixed in the next release you can bypass it by installing a canary version:
npm i gatsby#webpack-split-fix

How to solve make × ERR not found: make-$(SOURCE_FILES) while running npm run build command

I am trying to run command npm run build. I am getting error
`make i info Invoking build target
make i info Invoking dist/build target
(node:15892) UnhandledPromiseRejectionWarning: undefined
(Use `node --trace-warnings ...` to show where the warning was created)
(node:15892) 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:15892) [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.
make × ERR not found: make-$(SOURCE_FILES)`
Please anyone can help me to solve the problem.
I finally solved it installing make command using chocolaty in my window. I was getting error because make was not installed on my windows (I had no idea regarding that make is window's command not NodeJs').
This post helped me to solve my problem.
How to install and use "make" in Windows?

Unable to upgrade ReactNative from version 0.59.x to the latest version, 0.64.x

I am upgrading my ReactNative project to the latest ReactNative version. My project is currently using ReactNative version, 0.59.10. I am upgrading it to the version, 0.64.2.
I run the following command in the project's root directory.
npx react-native upgrade
When I run the command, I am getting the following error.
info No version passed. Fetching latest...
info Fetching diff between v0.59.10 and v0.64.2...
info Applying diff...
warn Excluding files that exist in the template, but not in your project:
error Automatically applying diff failed. We did our best to automatically upgrade as many files as possible
warn Continuing after failure. Some of the files are upgraded but you will need to deal with conflicts manually
info Installing "react-native#0.64.2" and its peer dependencies...
(node:37101) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'close' of undefined
at Object.<anonymous> (/Users/xandasupport/Desktop/Wais/pcl-app/node_modules/chalk/index.js:72:75)
at Module._compile (internal/modules/cjs/loader.js:999:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
at Module.load (internal/modules/cjs/loader.js:863:32)
at Function.Module._load (internal/modules/cjs/loader.js:708:14)
at Module.require (internal/modules/cjs/loader.js:887:19)
at require (internal/modules/cjs/helpers.js:74:18)
at _chalk (/Users/xandasupport/Desktop/Wais/pcl-app/node_modules/#react-native-community/cli/build/cliEntry.js:22:39)
at handleError (/Users/xandasupport/Desktop/Wais/pcl-app/node_modules/#react-native-community/cli/build/cliEntry.js:106:46)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:37101) 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: 3)
(node:37101) [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 am using Node JS version, v12.22.1. I tried using version, 14 too. I am still getting the same error. How can I fix it?

Duplicate module name: create-react-context. Declaration with same name across different files

I have the following React Native project:
https://github.com/napolev/react-native-paper
which I cloned from their official GitHub repository (there are no changes at all so far).
To install it and run it I did:
$ git clone https://github.com/napolev/react-native-paper
$ cd react-native-paper
$ npm i
$ cd example
$ npm i
$ expo start
After I get the QR code on the terminal I scan it with either: my Android or iOS smartphone and just after that I get on the terminal the following error:
$ expo start
[00:53:27] Starting project at D:\react-native-paper\example
[00:53:28] Expo DevTools is running at http://localhost:19002
[00:53:36] Starting Metro Bundler on port 19001.
[00:53:38] Tunnel ready.
[00:53:38] Your app is running at exp://192.168.1.194:19000
Logs for your project will appear below. Press Ctrl+C to exit.
[00:53:52] jest-haste-map: #providesModule naming collision:
[00:53:52] Duplicate module name: create-react-context
[00:53:52] Paths: D:\react-native-paper\example\node_modules\react-navigation\node_modules\create-react-context\package.json collides with D:\react-native-paper\example\node_modules\create-react-context\package.json
[00:53:52]
[00:53:52] This error is caused by a #providesModule declaration with the same name across two different files.
[00:53:52] (node:9828) UnhandledPromiseRejectionWarning: Error: jest-haste-map: #providesModule naming collision:
[00:53:52] Duplicate module name: create-react-context
[00:53:52] Paths: D:\react-native-paper\example\node_modules\react-navigation\node_modules\create-react-context\package.json collides with D:\react-native-paper\example\node_modules\create-react-context\package.json
[00:53:52]
[00:53:52] This error is caused by a #providesModule declaration with the same name across two different files.
[00:53:52] at setModule (D:\react-native-paper\example\node_modules\jest-haste-map\build\index.js:462:17)
[00:53:52] at workerReply (D:\react-native-paper\example\node_modules\jest-haste-map\build\index.js:512:9)
[00:53:52] at <anonymous>
[00:53:52] at process._tickCallback (internal/process/next_tick.js:188:7)
[00:53:52] (node:9828) 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(). (rejection id: 2)
[00:53:52] (node:9828) [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.
Also, on my both mobiles I get the following:
I don't understand why I don't get it to work when it was supposed that whatever the authors of that repository have in there is ready for install and run right away.
Any idea on how to get this to work?
Thanks!
This project uses yarn as a dependency manager, and is using specific features for selective version resolutions for its dependencies. see package.json:
"resolutions": {
"**/create-react-context": "0.2.3",
...
Clear your node_modules and reinstall using yarn.

i'm trying to build android ionic 1 app for testing but i don't get anything

'i have installed android studio and installed all sdk tools and jdk 1.8 but still app is not building'
'(node:4216) 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(). (rejection id: 1)
(node:4216) [DEP0018] DeprecationWarning: Unhandled promise rejections are depre cated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.'
Try to use
ionic version 3.20.0
npm install -g ionic#3.20.0
NodeJS Version 8.11.3
https://nodejs.org/download/release/v8.11.3/
Download JDK Version 1.8.0_171
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html?printOnly=1
I hope it will work for you.