0

I am using Windows 7 64-bit. Whenever I try to build my projects via command prompt, using opa command it generates a .js file which, when run, thows an error, saying: module.js: 340 throw err; - and such. opa create command also throws error, saying that opa-create.exe is not compatible with the version of windows I'm using, and it requires 64-bit , tho I am using 64-bit. I've seen someone saying that running node file.exe, for instance, could solve the problem, however it throws the same error as when running a .js file generated previously. Someone said: run npm install mongodb formidable nodemailer imap however the command throws an error, saying:

gyp ERR! configure error gyp ERR! stack Error: 
Command failed: File "<string>", line 1 
gyp ERR! stack import platform; print platform.python_version(); 
gyp ERR! stack 
gyp ERR! stack SyntaxError: invalid syntax 
gyp ERR! stack 
gyp ERR! stack at ChildProcess.exithandler (child_process.js:551:15) 
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:96:17) 
gyp ERR! stack at maybeClose (child_process.js:649:16) gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:701:5) 
gyp ERR! stack at process._makeCallback (node.js:248:20) 
gyp ERR! System Windows_NT 6.1.7601 gyp ERR! command "node" "C:\\Program Files\\nodejs\\node_modules\npm\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" 
gyp ERR! cwd C:\Users\Vincas\Documents\Opa Projects\experimentations\node_modules\nodemailer\node_modules\mailcomposer\node_modules\mimelib\node_modules\encoding\node_modules\iconv 
gyp ERR! node -v v0.9.3 
gyp ERR! node-gyp -v v0.7.1 
gyp ERR! not ok npm WARN optional dep failed, continuing iconv@1.2.3
user1548072
  • 478
  • 1
  • 6
  • 9

2 Answers2

1

To fix the gyp ERR! stack import platform; print platform.python_version(); issue try installing Python version 2.7.3 from http://www.python.org/download/.

I had this same error message when trying to install a different package with Python version 3.3.0 installed.

Gloopy
  • 37,767
  • 15
  • 103
  • 71
0

Indeed if you don't install the required node packages, you'll have the module not found error. It's true that ./app.exe (with .exe extension) doesn't work on Windows, but with a .js extension it does (just edit the EXE variable in the Makefile).

Your gyp ERR! stack import platform; print platform.python_version(); error is a npm related issue, you should ask for support directly via the nodejs community: http://nodejs.org/community/ (try stackoverflow or their mailing list).

Cédrics
  • 1,974
  • 11
  • 13
  • I don't have a makefile created, because I assumed that opa-create would create it, and since it doesn't work at all... Is it needed? As I just use command "opa" on plain .opa file. – user1548072 Oct 25 '12 at 19:38