api.node binary file not generated through npm install
brahmscode opened this issue · 19 comments
Facing issue like
Cannot find module './api' since api.node file is not generated. Kindly help. I tried through npm install only.
@brahmscode can you provide the messages you get when you run npm install, plus the contents of the debug.log file if one was produced - thanks.
@rnchamberlain This is the stacktrace got in npm-debug.log file.
126 warn optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/chokidar/node_modules/fsevents):
127 warn notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
128 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Valid OS: darwin
128 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Valid Arch: any
128 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Actual OS: linux
128 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Actual Arch: x64
129 warn node_sample@1.0.0 No repository field.
130 verbose If you need help, you may report this error at:
130 verbose <https://github.com/npm/npm/issues>
131 verbose stack Error: ENOENT: no such file or directory, access '/vzwhome/mahalbr/NodeAgent/node_modules/node-report'
131 verbose stack at Error (native)
132 verbose cwd /vzwhome/mahalbr/NodeAgent
133 error Linux 2.6.32-696.3.1.el6.x86_64
134 error argv "/usr/apps/spev/softwares/node-v6.11.3-linux-x64/bin/node" "/usr/apps/spev/softwares/node-v6.11.3-linux-x64/bin/npm" "install" "node-report@2.2.1"
135 error node v6.11.3
136 error npm v3.10.10
137 error path /vzwhome/mahalbr/NodeAgent/node_modules/node-report
138 error code ENOENT
139 error errno -2
140 error syscall access
141 error enoent ENOENT: no such file or directory, access '/vzwhome/mahalbr/NodeAgent/node_modules/node-report'
142 error enoent ENOENT: no such file or directory, access '/vzwhome/mahalbr/NodeAgent/node_modules/node-report'
142 error enoent This is most likely not a problem with npm itself
142 error enoent and is related to npm not being able to find a file.
@rnchamberlain This is the stacktrace got while running npm install.
node-report@2.2.1 install /vzwhome/mahalbr/NodeAgent/node_modules/node-report
node-gyp rebuild
make â ERR Missing Makefile / Bakefile
make â
¹ info Run "make init" to generate a Makefile.
node_sample@1.0.0 /vzwhome/mahalbr/NodeAgent
âââ node-report@2.2.1
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN node_sample@1.0.0 No repository field.
@brahmscode Internet search for "npm Error: ENOENT: no such file or directory
" turns up quite a few hits with people having the same problem, with other modules. Most suggestions are that there is already a directory in node_modules that is getting in the way. Try npm uninstall node-report
first, and/or go into the node-modules directory and check if there is something nasty, like an existing directory with a name like node-report.
Uninstalled node-report and reinstalled the same. But while installing got error trace like Missing bakefile/Makefile and inside node-report folder unable to get API.node file
Failure to find api.node means that did not get as far as building the node-report executable.
Might be worth creating a clean new directory, then trying npm install node-report
in there, just to see if there is something in the local environment that is causing the problem.
Tried in new directory too. Unable to get the binary file. Does it have anything to do with node version. I m running this on v6.11.3. Addign to that, on every install gettign error like > node-report@2.2.1 install /vzwhome/mahalbr/node_modules/node-report
node-gyp rebuild
make â ERR Missing Makefile / Bakefile
make â
¹ info Run "make init" to generate a Makefile.
Any inputs on this pls.
Weird, some other people seem to be hitting that error when installing native modules on Linux:
https://stackoverflow.com/questions/46587834/unable-to-install-node-expat-in-linux
audreyt/node-webworker-threads#157
One of those is on v7.10.0, so doesn't look like it's a node version thing
@brahmscode Are you able to install any other npm that requires compilation (e.g. heapdump)? What does make --version
print?
@richardlau Yes I am able to install other packages and my make version is 3.81 and it runs on python 2.6.6
Could some one pls help in resolving the issue. I got the binary installed in some other environment. But copying the same caused a module version mismatch issue like _dlopen. So having the binary file installed in the same environment is the only option left out. Kindly help.
A couple of other things to try (no guarantees, I just found these by searching similar issues):
- Run
npm cache clean
- Delete any
package-lock.json
files
If still no luck, could you run npm install --verbose node-report
and paste all the output into a comment here - thanks
@rnchamberlain ,
Pls find the output here.
gyp info spawn make
gyp info spawn args [ 'V=1', 'BUILDTYPE=Release', '-C', 'build' ]
make â ERR Missing Makefile / Bakefile
make â
¹ info Run "make init" to generate a Makefile.
gyp info ok
npm verb lifecycle node-report@2.2.1~install: unsafe-perm in lifecycle true
npm verb lifecycle node-report@2.2.1~install: PATH: /usr/apps/spev/softwares/node-v6.11.3-linux-x64/lib/node_modules/npm/bin/node-gyp-bin:/vzwhome/mahalbr/NodeAgent/node_modules/node-report/node_modules/.bin:/vzwhome/mahalbr/NodeAgent/node_ modules/.bin:/usr/lib64/qt-3.3/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/apps/spev/softwares/node-v6.11.3-linux-x64/bin/
npm verb lifecycle node-report@2.2.1~install: CWD: /vzwhome/mahalbr/NodeAgent/node_modules/node-report
npm info lifecycle node-report@2.2.1~postinstall: node-report@2.2.1
npm verb unlock done using /usr/apps/spev/.npm/_locks/staging-2574547f28aa2911.lock for /vzwhome/mahalbr/NodeAgent/node_modules/.staging
node_sample@1.0.0 /vzwhome/mahalbr/NodeAgent
âââ node-report@2.2.1
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm verb notsup SKIPPING OPTIONAL DEPENDENCY: Valid OS: darwin
npm verb notsup SKIPPING OPTIONAL DEPENDENCY: Valid Arch: any
npm verb notsup SKIPPING OPTIONAL DEPENDENCY: Actual OS: linux
npm verb notsup SKIPPING OPTIONAL DEPENDENCY: Actual Arch: x64
npm WARN node_sample@1.0.0 No repository field.
npm verb
npm verb If you need help, you may report this error at:
npm verb <https://github.com/npm/npm/issues>
npm verb exit [ 0, true ]
npm info ok
FWIW the stackoverflow question referenced above, which reported a similar Missing Makefile / Bakefile
message, has since been answered with the comment "Reinstalling NodeJS version 8.0 solved the problem for me" - so that may be worth trying.
@rnchamberlain. Tried that approach too. No luck on it too.
FTR: make ✖ ERR Missing Makefile / Bakefile
is the output of an npm package called make
. That confuses node-gyp
and breaks the build.
Im getting this error as well none of the fixes mentioned above works. Can someone please help?
make ✖ ERR Missing Makefile / Bakefile
make ℹ info Run "make init" to generate a Makefile.
@richardlau can you review/comment
As @refack points out in #102 (comment) the error message make ✖ ERR Missing Makefile / Bakefile
is coming from another npm package called make
that is supplanting make
from the normal build toolchain.
Please remove the conflicting module.
Closing out as this isn't an issue with node-report
.