question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

npx create-react-native-dapp failed

See original GitHub issue

Description Error when running “npx create-react-native-dapp” It is a fresh folder

To Reproduce Steps to reproduce the behavior: 1)New folder 2) Execute “npx create-react-native-dapp” 3) Dependencies install until error

...
...
...
warning " > @nomiclabs/hardhat-waffle@2.0.3" has unmet peer dependency "ethers@^5.0.0".
warning " > react-test-renderer@17.0.1" has incorrect peer dependency "react@17.0.1".
[4/4] Building fresh packages...
[-/13] ⠠ waiting...
[-/13] ⠠ waiting...
[-/13] ⠠ waiting...
[13/13] ⠠ postinstall-postinstall
error C:\Workspace\react-native-dapp\my-react-dapp\node_modules\postinstall-postinstall: Command failed.
Exit code: 1
Command: node ./run.js
Arguments:
Directory: C:\Workspace\react-native-dapp\my-react-dapp\node_modules\postinstall-postinstall
Output:
C:\Workspace\react-native-dapp\my-react-dapp\node_modules\typescript\lib\typescript.js:42537
        ts.Debug.assert(typeof typeReferenceDirectiveName === "string", "Non-string value passed to `ts.resolveTypeReferenceDirective`, likely by a wrapping package working with an outdated `resolveTypeReferenceDirectives` signature. This is probably not a problem in TS itself.");
                 ^
Error: Debug Failure. False expression: Non-string value passed to `ts.resolveTypeReferenceDirective`, likely by a wrapping package working with an outdated `resolveTypeReferenceDirectives` signature. This is probably not a problem in TS itself.
    at Object.resolveTypeReferenceDirective (C:\Workspace\react-native-dapp\my-react-dapp\node_modules\typescript\lib\typescript.js:42537:18)
    at C:\Workspace\react-native-dapp\my-react-dapp\node_modules\ts-node\src\index.ts:623:55
    at Array.map (<anonymous>)
    at Object.resolveTypeReferenceDirectives (C:\Workspace\react-native-dapp\my-react-dapp\node_modules\ts-node\src\index.ts:622:33)
    at actualResolveTypeReferenceDirectiveNamesWorker (C:\Workspace\react-native-dapp\my-react-dapp\node_modules\typescript\lib\typescript.js:116674:163)
    at resolveTypeReferenceDirectiveNamesWorker (C:\Workspace\react-native-dapp\my-react-dapp\node_modules\typescript\lib\typescript.js:116974:26)
    at processTypeReferenceDirectives (C:\Workspace\react-native-dapp\my-react-dapp\node_modules\typescript\lib\typescript.js:118456:31)
    at findSourceFileWorker (C:\Workspace\react-native-dapp\my-react-dapp\node_modules\typescript\lib\typescript.js:118341:21)
    at findSourceFile (C:\Workspace\react-native-dapp\my-react-dapp\node_modules\typescript\lib\typescript.js:118196:26)
    at processImportedModules (C:\Workspace\react-native-dapp\my-react-dapp\node_modules\typescript\lib\typescript.js:118602:25)
error Command failed with exit code 1.
node:child_process:903
    throw err;
    ^

Error: Command failed: yarn run postinstall

C:\Workspace\react-native-dapp\my-react-dapp\node_modules\typescript\lib\typescript.js:42537
        ts.Debug.assert(typeof typeReferenceDirectiveName === "string", "Non-string value passed to `ts.resolveTypeReferenceDirective`, likely by a wrapping package working with an outdated `resolveTypeReferenceDirectives` signature. This is probably not a problem in TS itself.");
                 ^
Error: Debug Failure. False expression: Non-string value passed to `ts.resolveTypeReferenceDirective`, likely by a wrapping package working with an outdated `resolveTypeReferenceDirectives` signature. This is probably not a problem in TS itself.
    at Object.resolveTypeReferenceDirective (C:\Workspace\react-native-dapp\my-react-dapp\node_modules\typescript\lib\typescript.js:42537:18)
    at C:\Workspace\react-native-dapp\my-react-dapp\node_modules\ts-node\src\index.ts:623:55
    at Array.map (<anonymous>)
    at Object.resolveTypeReferenceDirectives (C:\Workspace\react-native-dapp\my-react-dapp\node_modules\ts-node\src\index.ts:622:33)
    at actualResolveTypeReferenceDirectiveNamesWorker (C:\Workspace\react-native-dapp\my-react-dapp\node_modules\typescript\lib\typescript.js:116674:163)
    at resolveTypeReferenceDirectiveNamesWorker (C:\Workspace\react-native-dapp\my-react-dapp\node_modules\typescript\lib\typescript.js:116974:26)
    at processTypeReferenceDirectives (C:\Workspace\react-native-dapp\my-react-dapp\node_modules\typescript\lib\typescript.js:118456:31)
    at findSourceFileWorker (C:\Workspace\react-native-dapp\my-react-dapp\node_modules\typescript\lib\typescript.js:118341:21)
    at findSourceFile (C:\Workspace\react-native-dapp\my-react-dapp\node_modules\typescript\lib\typescript.js:118196:26)
    at processImportedModules (C:\Workspace\react-native-dapp\my-react-dapp\node_modules\typescript\lib\typescript.js:118602:25)
error Command failed with exit code 1.

    at checkExecSyncError (node:child_process:826:11)
    at execSync (node:child_process:900:15)
    at Object.<anonymous> (C:\Workspace\react-native-dapp\my-react-dapp\node_modules\postinstall-postinstall\run.js:15:5)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:17:47 {
  status: 1,
  signal: null,
  output: [
    null,
    Buffer(151) [Uint8Array] [
      121,  97, 114, 110,  32, 114, 117, 110,  32, 118,  49,  46,
       50,  50,  46,  49,  57,  10,  36,  32, 110, 111, 100, 101,
       95, 109, 111, 100, 117, 108, 101, 115,  47,  46,  98, 105,
      110,  47, 116, 115,  45, 110, 111, 100, 101,  32, 115,  99,
      114, 105, 112, 116, 115,  47, 112, 111, 115, 116, 105, 110,
      115, 116,  97, 108, 108,  10, 105, 110, 102, 111,  32,  86,
      105, 115, 105, 116,  32, 104, 116, 116, 112, 115,  58,  47,
       47, 121,  97, 114, 110, 112, 107, 103,  46,  99, 111, 109,
       47, 101, 110,  47,
      ... 51 more items
    ],
    Buffer(1894) [Uint8Array] [
       10,  67,  58,  92,  87, 111, 114, 107, 115, 112,  97,  99,
      101,  92, 114, 101,  97,  99, 116,  45, 110,  97, 116, 105,
      118, 101,  45, 100,  97, 112, 112,  92, 109, 121,  45, 114,
      101,  97,  99, 116,  45, 100,  97, 112, 112,  92, 110, 111,
      100, 101,  95, 109, 111, 100, 117, 108, 101, 115,  92, 116,
      121, 112, 101, 115,  99, 114, 105, 112, 116,  92, 108, 105,
       98,  92, 116, 121, 112, 101, 115,  99, 114, 105, 112, 116,
       46, 106, 115,  58,  52,  50,  53,  51,  55,  10,  32,  32,
       32,  32,  32,  32,
      ... 1794 more items
    ]
  ],
  pid: 29100,
  stdout: Buffer(151) [Uint8Array] [
    121,  97, 114, 110,  32, 114, 117, 110,  32, 118,  49,  46,
     50,  50,  46,  49,  57,  10,  36,  32, 110, 111, 100, 101,
     95, 109, 111, 100, 117, 108, 101, 115,  47,  46,  98, 105,
    110,  47, 116, 115,  45, 110, 111, 100, 101,  32, 115,  99,
    114, 105, 112, 116, 115,  47, 112, 111, 115, 116, 105, 110,
    115, 116,  97, 108, 108,  10, 105, 110, 102, 111,  32,  86,
    105, 115, 105, 116,  32, 104, 116, 116, 112, 115,  58,  47,
     47, 121,  97, 114, 110, 112, 107, 103,  46,  99, 111, 109,
     47, 101, 110,  47,
    ... 51 more items
  ],
  stderr: Buffer(1894) [Uint8Array] [
     10,  67,  58,  92,  87, 111, 114, 107, 115, 112,  97,  99,
    101,  92, 114, 101,  97,  99, 116,  45, 110,  97, 116, 105,
    118, 101,  45, 100,  97, 112, 112,  92, 109, 121,  45, 114,
    101,  97,  99, 116,  45, 100,  97, 112, 112,  92, 110, 111,
    100, 101,  95, 109, 111, 100, 117, 108, 101, 115,  92, 116,
    121, 112, 101, 115,  99, 114, 105, 112, 116,  92, 108, 105,
     98,  92, 116, 121, 112, 101, 115,  99, 114, 105, 112, 116,
     46, 106, 115,  58,  52,  50,  53,  51,  55,  10,  32,  32,
     32,  32,  32,  32,



node:child_process:826
    err = new Error(msg);
          ^

Error: Command failed: yarn
    at checkExecSyncError (node:child_process:826:11)
    at Object.execSync (node:child_process:900:15)
    at shouldInstall (C:\Users\coryt\AppData\Local\npm-cache\_npx\1064147bb9e7ae50\node_modules\create-react-native-dapp\build\main\buidler\index.js:534:48)
    at Object.create (C:\Users\coryt\AppData\Local\npm-cache\_npx\1064147bb9e7ae50\node_modules\create-react-native-dapp\build\main\buidler\index.js:777:5)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async C:\Users\coryt\AppData\Local\npm-cache\_npx\1064147bb9e7ae50\node_modules\create-react-native-dapp\build\main\cli\index.js:119:33 {
  status: 1,
  signal: null,
  output: [ null, null, null ],
  pid: 2876,
  stdout: null,
  stderr: null
}

Desktop (please complete the following information):

  • OS: Windows 10 Home

-Visual Studio Code Version: 1.70.2 (user setup) Commit: e4503b30fc78200f846c62cf8091b76ff5547662 Date: 2022-08-16T05:35:13.448Z Electron: 18.3.5 Chromium: 100.0.4896.160 Node.js: 16.13.2 V8: 10.0.139.17-electron.0 OS: Windows_NT x64 10.0.19044

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:9

github_iconTop GitHub Comments

2reactions
p0st1tcommented, Sep 2, 2022

Exactly the same error for me… I tried to re-run “yarn install” after updating the ts-node version but same error again

OS : Parrot OS 5.0 (Electro Ara)

Node : v16.15.1 npm : 8.11.0 Expo : 6.0.5 yarn : 1.22.19

(I am correctly connected to expo cli with my account)

EDIT : The correct ts-node version was the 10.9.1. Thank you !

Now i have an error because index.js try to inject App.tsx from a non-existent folder “frontend”. I fixed it, and now, i have a white screen on expo go.

What a project lol, it is likely that integrating walletconnect yourself will be easier and faster

Or this repo seems to work better : https://github.com/clxyder/walletconnect-expo-example

0reactions
0xgarethcommented, Dec 9, 2022

works with node v16, so as @shantohx suggests you can nvm install 16 & edit index.js accordingly and you should be good

and i’m on M1

Read more comments on GitHub >

github_iconTop Results From Across the Web

I can't install react using npx create-react-app? - Stack Overflow
This happens is if one of the node modules requires to install your react app is missing. The other reason is if your...
Read more >
npx create-react-app is not working · Issue #10132 - GitHub
I am able to solve the problem by first trying to uninstall the npm globally, update the npm, clear the cache then using...
Read more >
Troubleshooting - React Native
These are some common issues you may run into while setting up React Native. If you encounter something that is not listed here, ......
Read more >
Addressing common errors in React Native - LogRocket Blog
Another error that developers commonly encounter when attempting to run their React Native application is shown below: Unable to load script.
Read more >
create-react-native-app - npm
Create React Native apps with no build configuration.. Latest version: 3.8.0, last published: a year ago.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found