jyrimatti / renative-hs-example-todo

React-Native in Haskell, TODO example
MIT License
1 stars 0 forks source link

rnproject/package.json: No such file or directory #1

Open hasanalrasyid opened 5 years ago

hasanalrasyid commented 5 years ago

Should I provide my own package.json here?

$> ./rnv.sh
Give 'rnproject' for project Name
Wrapping nodejs
/run/media/aku/e93d7b50-ff68-4027-bec2-4f3bf879b3c9/kanazawa/dev/react-native-haskell/newhseverywhere/renative-hs-example-todo/node_modules/bindings/bindings.js:121
        throw e;
        ^

Error: The module '/run/media/aku/e93d7b50-ff68-4027-bec2-4f3bf879b3c9/kanazawa/dev/react-native-haskell/newhseverywhere/renative-hs-example-todo/node_modules/node-expat/bui
ld/Release/node_expat.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 72. This version of Node.js requires
NODE_MODULE_VERSION 64. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`).
    at Object.Module._extensions..node (internal/modules/cjs/loader.js:730:18)
    at Module.load (internal/modules/cjs/loader.js:600:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
    at Function.Module._load (internal/modules/cjs/loader.js:531:3)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:22:18)
    at bindings (/run/media/aku/e93d7b50-ff68-4027-bec2-4f3bf879b3c9/kanazawa/dev/react-native-haskell/newhseverywhere/renative-hs-example-todo/node_modules/bindings/binding
s.js:112:48)
    at Object.<anonymous> (/run/media/aku/e93d7b50-ff68-4027-bec2-4f3bf879b3c9/kanazawa/dev/react-native-haskell/newhseverywhere/renative-hs-example-todo/node_modules/node-e
xpat/lib/node-expat.js:4:32)
    at Module._compile (internal/modules/cjs/loader.js:701:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
sed: can't read /run/media/aku/e93d7b50-ff68-4027-bec2-4f3bf879b3c9/kanazawa/dev/react-native-haskell/newhseverywhere/renative-hs-example-todo/rnproject/package.json: No suc
h file or directory

FYI, ./build.sh finished successfully. This is very exciting :dancer:

jyrimatti commented 5 years ago

No, Renative creates a package.json when it cannot find one. The sed in rnv.sh injects some browser-specific stuff to the generated package.json to make ghcjs work.

Did you use 'rnproject' as the project name when Renative asks for it? The directory it creates is supposed to be named 'rnproject': "renative-hs-example-todo/rnproject/package.json: No suc h file or directory". Yes, it would be better if this wasn't required.

I don't know where those NODE warnings come from or whether they are relevant. You possibly have (?) Node installed somewhere globally, and it's possibly getting invoked instead of the Nix one. Making the Nix scripts --pure might help with that kind of things, but it sometimes brings new problems since some stuff is needed from the system (like xcode tools).