Skip to content
This repository has been archived by the owner on Sep 19, 2018. It is now read-only.

Error: The specified module could not be found. #12

Closed
Sushovan861 opened this issue Oct 22, 2013 · 7 comments
Closed

Error: The specified module could not be found. #12

Sushovan861 opened this issue Oct 22, 2013 · 7 comments

Comments

@Sushovan861
Copy link

I have installed blpapi (the build was successful and the all the required code under build/release/... were generated),while adding the require('blpapi') in the node application I am always ending up with Module not found error.

Error: The specified module could not be found.
C:\NODE development\myjs\node_modules\blpapi\build\Release\blpapijs.node
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object. (C:\NODE development\myjs\node_modules\blpapi\blpapi.j
s:6:14)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)

I am using the v0.10.20 version of the node on a windows 7 machine with Express studio 2012 installed. The problem as shown in the log refers to the blpapi.js line 6 character 14.

var blpapi = require(path.join(__dirname, '/build/Release/blpapijs'));

when I do the console over path.join it actually shows the right place of the generated code.

Please help me in resolving this issue,

@apaprocki
Copy link
Member

I installed the latest Node x64 v0.10.21 from the website onto a clean Windows 7 PC into the target directory C:\NODE development and was able to successfully run the examples:

C:\NODE development>node node_modules\blpapi\examples\FieldSearchRequest.js 127.0.0.1 "last price"
PX_LAST => Last Price
...

Please un-install all existing Node installations, delete your C:\NODE development directory entirely to ensure you are starting with a clean slate. Install the Node x64 .msi, click the "Node.js command prompt" and type the following:

C:\> cd "C:\NODE development"
C:\NODE development> npm install blpapi
...
C:\NODE development> node node_modules\blpapi\examples\FieldSearchRequest.js 127.0.0.1 "last price"

I suspect something is incorrect with your installation or your environment inside your command prompt. Make sure you are using the "Node.js command prompt" included in the Node installation.

@Sushovan861
Copy link
Author

I tried the same and still the same error, still not able to figure out the root cause of the problem in my machine

@mcg88
Copy link

mcg88 commented Mar 13, 2014

Hello,

I'm also having this issue. I installed exactly as described using the npm install blpapi command. However, there is no /build/Release folder created and I'm getting the same error:
Error: The specified module could not be found.
C:\NODE development\myjs\node_modules\blpapi\build\Release\blpapijs.node

Any ideas why this file/folders are missing>?

@mcg88
Copy link

mcg88 commented Mar 13, 2014

additionally: the log contains the following errors:

163 silly resolved []
164 verbose about to build c:\development\b\node_modules\blpapi
165 info build c:\development\b\node_modules\blpapi
166 verbose linkStuff [ false, false, false, 'c:\development\b\node_modules' ]
167 info linkStuff blpapi@0.1.6
168 verbose linkBins blpapi@0.1.6
169 verbose linkMans blpapi@0.1.6
170 verbose rebuildBundles blpapi@0.1.6
171 info install blpapi@0.1.6
172 verbose unsafe-perm in lifecycle true
173 error Error: spawn ENOENT
173 error at errnoException (child_process.js:988:11)
173 error at Process.ChildProcess._handle.onexit (child_process.js:779:34)
174 error If you need help, you may report this entire log,
174 error including the npm and node versions, at:
174 error http://github.com/npm/npm/issues
175 error System Windows_NT 6.1.7601
176 error command "C:\Program Files (x86)\nodejs\node.exe" "C:\Program Files (x86)\nodejs\node_modules\npm\bin\npm-cli.js" "install" "blpapi"
177 error cwd c:\development\b
178 error node -v v0.10.26
179 error npm -v 1.4.3
180 error syscall spawn
181 error code ENOENT
182 error errno ENOENT
183 verbose exit [ 1, true ]

@apaprocki
Copy link
Member

@mcgwebdesign At first glance from that log, it appears you're being affected by nodejs/node-v0.x-archive#2318

@yangpu
Copy link

yangpu commented Jul 17, 2014

I meet the exactly error either on x64 win7.

@ericvw
Copy link
Contributor

ericvw commented Jun 1, 2015

#58 should resolve this issue.

@ericvw ericvw closed this as completed Jun 1, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants