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

npx create-react-native-dapp failed #39

Open
corytam opened this issue Aug 28, 2022 · 10 comments
Open

npx create-react-native-dapp failed #39

corytam opened this issue Aug 28, 2022 · 10 comments

Comments

@corytam
Copy link

corytam commented Aug 28, 2022

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/[email protected]" has unmet peer dependency "ethers@^5.0.0".
warning " > [email protected]" has incorrect peer dependency "[email protected]".
[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

@iovreche
Copy link

Same here, MacOS Monterey, M1

@prathameshnetake
Copy link

Change ts-node version to 10.x in dev dependencies

@Tomas-Shao
Copy link

same error here, MacOS Monterey 12.6

@developaul-k
Copy link

same issue, MacOS Monterey 12.6, intel

@Cancuuu
Copy link

Cancuuu commented Oct 26, 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

Hey! how did you solved the white screen problem? im facing the same error when i run expo start, but if run expo run:ios works well :/

@shanto-datta
Copy link

shanto-datta commented Nov 20, 2022

Try using different version of node. I was getting the same error. I used nvm use 12 to use node version 12.*, the project successfully installed but failed in yarn start requiring node version 14+. I changed the node version using the same command, 'nvm use 14'. Then I came across another import issue in index.js. Which will be solved by removing ./frontend/App because folder named frontend doesn't exist. So, change it to './App' and the app finally runs.

If you don't know how to use nvm: https://www.linode.com/docs/guides/how-to-install-use-node-version-manager-nvm/

@shin101004
Copy link

@shantohx Have you tried node v16?

@ga-reth
Copy link

ga-reth commented 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

@pad01g
Copy link

pad01g commented Mar 27, 2023

I also needed to remove process.version section in index.js for it to work.

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

No branches or pull requests

11 participants