"reaction init" produces an error on Windows 8.1


#1

I’m getting an error when trying to do “reaction init”.

Meteor is installed. Windows tools with Python are installed as well. debug log is attached.

npm ERR! git clone C:\Users\User\AppData\Local\.meteor\packages\meteor-tool\1.5.
2_2\mt-os.windows.x86_32\dev_bundle\.npm\_git-remotes\git-github-com-reactioncom
merce-transliteration-git-5ec7c7d9 C:\Users\User\AppData\Local\Temp\npm-5160-206
9317c\git-cache-e12d1889\699d48cc8dd9a64f1a2773e1b36b6faa4bbdca2f: Cloning into
'C:\Users\User\AppData\Local\Temp\npm-5160-2069317c\git-cache-e12d1889\699d48cc8
dd9a64f1a2773e1b36b6faa4bbdca2f'...
npm ERR! git clone C:\Users\User\AppData\Local\.meteor\packages\meteor-tool\1.5.
2_2\mt-os.windows.x86_32\dev_bundle\.npm\_git-remotes\git-github-com-reactioncom
merce-transliteration-git-5ec7c7d9 C:\Users\User\AppData\Local\Temp\npm-5160-206
9317c\git-cache-e12d1889\699d48cc8dd9a64f1a2773e1b36b6faa4bbdca2f: error: cannot
 spawn sh: No such file or directory
npm ERR! git clone C:\Users\User\AppData\Local\.meteor\packages\meteor-tool\1.5.
2_2\mt-os.windows.x86_32\dev_bundle\.npm\_git-remotes\git-github-com-reactioncom
merce-transliteration-git-5ec7c7d9 C:\Users\User\AppData\Local\Temp\npm-5160-206
9317c\git-cache-e12d1889\699d48cc8dd9a64f1a2773e1b36b6faa4bbdca2f: fatal: unable
 to fork
npm ERR! git clone C:\Users\User\AppData\Local\.meteor\packages\meteor-tool\1.5.
2_2\mt-os.windows.x86_32\dev_bundle\.npm\_git-remotes\git-github-com-reactioncom
merce-transliteration-git-5ec7c7d9 C:\Users\User\AppData\Local\Temp\npm-5160-206
9317c\git-cache-e12d1889\699d48cc8dd9a64f1a2773e1b36b6faa4bbdca2f:
npm ERR! git fetch -a origin (https://github.com/reactioncommerce/transliteratio
n.git) fatal: Unable to find remote helper for 'https'
npm WARN addRemoteGit Error: Command failed: git -c core.longpaths=true config -
-get remote.origin.url
npm WARN addRemoteGit
npm WARN addRemoteGit     at ChildProcess.exithandler (child_process.js:200:12)
npm WARN addRemoteGit     at emitTwo (events.js:87:13)
npm WARN addRemoteGit     at ChildProcess.emit (events.js:172:7)
npm WARN addRemoteGit     at maybeClose (internal/child_process.js:862:16)
npm WARN addRemoteGit     at Process.ChildProcess._handle.onexit (internal/child
_process.js:222:5)
npm WARN addRemoteGit  reactioncommerce/transliteration resetting remote C:\User
s\User\AppData\Local\.meteor\packages\meteor-tool\1.5.2_2\mt-os.windows.x86_32\d
ev_bundle\.npm\_git-remotes\git-github-com-reactioncommerce-transliteration-git-
8d5184dd because of error: { [Error: Command failed: git -c core.longpaths=true
config --get remote.origin.url
npm WARN addRemoteGit ]
npm WARN addRemoteGit   killed: false,
npm WARN addRemoteGit   code: 1,
npm WARN addRemoteGit   signal: null,
npm WARN addRemoteGit   cmd: 'git -c core.longpaths=true config --get remote.ori
gin.url' }
npm ERR! git clone --template=C:\Users\User\AppData\Local\.meteor\packages\meteo
r-tool\1.5.2_2\mt-os.windows.x86_32\dev_bundle\.npm\_git-remotes\_templates --mi
rror git@github.com:reactioncommerce/transliteration.git C:\Users\User\AppData\L
ocal\.meteor\packages\meteor-tool\1.5.2_2\mt-os.windows.x86_32\dev_bundle\.npm\_
git-remotes\git-github-com-reactioncommerce-transliteration-git-8d5184dd: Clonin
g into bare repository 'C:\Users\User\AppData\Local\.meteor\packages\meteor-tool
\1.5.2_2\mt-os.windows.x86_32\dev_bundle\.npm\_git-remotes\git-github-com-reacti
oncommerce-transliteration-git-8d5184dd'...
npm ERR! git clone --template=C:\Users\User\AppData\Local\.meteor\packages\meteo
r-tool\1.5.2_2\mt-os.windows.x86_32\dev_bundle\.npm\_git-remotes\_templates --mi
rror git@github.com:reactioncommerce/transliteration.git C:\Users\User\AppData\L
ocal\.meteor\packages\meteor-tool\1.5.2_2\mt-os.windows.x86_32\dev_bundle\.npm\_
git-remotes\git-github-com-reactioncommerce-transliteration-git-8d5184dd: error:
 cannot spawn ssh: No such file or directory
npm ERR! git clone --template=C:\Users\User\AppData\Local\.meteor\packages\meteo
r-tool\1.5.2_2\mt-os.windows.x86_32\dev_bundle\.npm\_git-remotes\_templates --mi
rror git@github.com:reactioncommerce/transliteration.git C:\Users\User\AppData\L
ocal\.meteor\packages\meteor-tool\1.5.2_2\mt-os.windows.x86_32\dev_bundle\.npm\_
git-remotes\git-github-com-reactioncommerce-transliteration-git-8d5184dd: fatal:
 unable to fork
npm ERR! code 128
npm ERR! Command failed: git -c core.longpaths=true clone --template=C:\Users\Us
er\AppData\Local\.meteor\packages\meteor-tool\1.5.2_2\mt-os.windows.x86_32\dev_b
undle\.npm\_git-remotes\_templates --mirror git@github.com:reactioncommerce/tran
sliteration.git C:\Users\User\AppData\Local\.meteor\packages\meteor-tool\1.5.2_2
\mt-os.windows.x86_32\dev_bundle\.npm\_git-remotes\git-github-com-reactioncommer
ce-transliteration-git-8d5184dd
npm ERR! Cloning into bare repository 'C:\Users\User\AppData\Local\.meteor\packa
ges\meteor-tool\1.5.2_2\mt-os.windows.x86_32\dev_bundle\.npm\_git-remotes\git-gi
thub-com-reactioncommerce-transliteration-git-8d5184dd'...
npm ERR! error: cannot spawn ssh: No such file or directory
npm ERR! fatal: unable to fork
npm ERR!

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\User\AppData\Local\.meteor\packages\meteor-tool\1.5.2_2\mt
-os.windows.x86_32\dev_bundle\.npm\_logs\2017-10-29T15_50_53_993Z-debug.log

#2

Do you have OpenSSH installed? I’m pretty sure that’s a requirement of git. It looks like all of the errors there are related to ssh commands failing (which is one of the ways a git clone pulls down a repo).


#3

Didn’t find any tutorials on how to install OpenSSH on Windows 8. Do you know any?
I tried doing "git clone … " successfully. Then I entered the reaction folder and executed “meteor npm install” successfully. I tried to launch it with “reaction”, but it gets stuck at “Started Proxy -> Started MongoDB”. Waiting for 10 minutes, nothing happens.


#4

I could install OpenSSH, restarted my PC and tried to do “reaction init” again. This time, I didn’t get the error from above, but the whole process stopped (actually it was running for ages), at:

Cloning the master branch of Reaction from Github...
Cloning into 'reaction'...
Checking out files: 100% (2534/2534), done.

Installing NPM packages...
npm WARN prefer global marked@0.3.6 should be installed with -g

> dtrace-provider@0.8.5 install C:\Lukas\Programavimas\reaction\node_modules\dt
ace-provider
> node scripts/install.js


> fibers@2.0.0 install C:\Lukas\Programavimas\reaction\node_modules\fibers
> node build.js || nodejs build.js

I have stopped the process, entered the “reaction” folder and executed “reaction”. After few minutes I got the messages “Started proxy” and “Started MongoDB”. After about 20 more minutes, I got the error “FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - process out of memory”. If you can tell me how can I access the full log, I could paste it here too.

Using settings file at settings/dev.settings.json

Setting up plugin imports...

Installing dependencies for connectors-shopify...

npm WARN reaction-connectors-shopify@1.0.0 No repository field.
Setting up style imports...

[[[[[ C:\Lukas\Programavimas\reaction ]]]]]

=> Started proxy.
=> Started MongoDB.
cfs:tempstore: updating npm dependencies -- combined-stream...
cfs:gridfs: updating npm dependencies -- mongodb, gridfs-stream...
FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - process out of memory

#5

I have the same issue as Lukas has described. Any help?


#6

Well, have fixed it by

set TOOL_NODE_FLAGS="–max_old_space_size=1024"


#7

Hey, where did you put that code?
I have tried
reaction init set TOOL_NODE_FLAGS="-max_old_space_size=1024"
but it didn’t work.


#8

just put it in the cmd, here how it looked in my folder:

C:\BookShop\reaction>set TOOL_NODE_FLAGS="–max_old_space_size=1024"

and after that run reaction

But now I see that my problem was during run of the reaction, not during init stage. So i have set this option after successful init.


#9

First, I have tried to clone “reaction”.
Then, I have executed the command:
C:\Lukas\Programavimas\reaction>set TOOL_NODE_FLAGS="-max_old_space_size=1024"

and executed “meteor npm install” in the “reaction” folder, but it produced the following error:

C:\Lukas\Programavimas\reaction>meteor npm install
module.js:327
    throw err;
    ^

Error: Cannot find module 'C:\Lukas\Programavimas\reaction\-max_old_space_size=1
024'
    at Function.Module._resolveFilename (module.js:325:15)
    at Function.Module._load (module.js:276:25)
    at Function.Module.runMain (module.js:441:10)
    at startup (node.js:140:18)
    at node.js:1043:3

NPM moduels were installed correctly this time. Finally, I executed “reaction”, and got the following error:

C:\Lukas\Programavimas\reaction>reaction

Using settings file at settings/dev.settings.json

Setting up plugin imports...

Installing dependencies for connectors-shopify...

module.js:327
    throw err;
    ^

Error: Cannot find module 'C:\Lukas\Programavimas\reaction\imports\plugins\inclu
ded\connectors-shopify\-max_old_space_size=1024'
    at Function.Module._resolveFilename (module.js:325:15)
    at Function.Module._load (module.js:276:25)
    at Function.Module.runMain (module.js:441:10)
    at startup (node.js:140:18)
    at node.js:1043:3
Failed to install npm dependencies for plugin: connectors-shopify

#10

Sorry, Lukas. Don’t know how to help with these errors.


#11

Hello there! In your case, do not clone, just download the zip file and extract to a folder of choice. Then within the folder do the following: (1) Run: npm install (2) meteor npm install --save deep-equal
(3) meteor npm install --save bcrypt
(4) npm install core-js

Then finally do this run, this command with git bash console: TOOL_NODE_FLAGS="-max_old_space_size=1024" reaction


#12

Thank you very much, it worked!

Notice for others: After executing all the steps, I found the same error. I had to repeat steps 2 and 3 and the app started to work. The only error I have got after installing bcrypt and deep-equal was “npm invalid verision … babel…”, but that didn´t stop the app from working.


#13

I am glad you are fine, you had a visual of the site?


#14

Yes, I could open localhost:3000 and see the shop. I also got admin login and password shown on the screen.


#15

@LukasNavickas Did you get it working with the 1024 value of the TOO_NODE_FLAGS command?


#16

Okay!! You are on!! Smooth sail Lukas.


#17

I did exactly what @ememumoh proposed and it worked.


#18

Well it looks like I am the only one who can not manage to run this. I am also following everything what @ememumoh proposed :slight_smile:
It is weird because it does not work even if I try to build a docker image. It fails on the meteor building step and I believe it is a memory issue again.

Anyways thank you both @LukasNavickas and @ememumoh !