Skip to content
This repository has been archived by the owner on Jun 18, 2021. It is now read-only.

api.node binary file not generated through npm install #102

Closed
brahmscode opened this issue Oct 6, 2017 · 19 comments
Closed

api.node binary file not generated through npm install #102

brahmscode opened this issue Oct 6, 2017 · 19 comments

Comments

@brahmscode
Copy link

brahmscode commented Oct 6, 2017

Facing issue like
Cannot find module './api' since api.node file is not generated. Kindly help. I tried through npm install only.

@rnchamberlain
Copy link
Contributor

@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 rnchamberlain changed the title api.node binary fiel not generated through npm install api.node binary file not generated through npm install Oct 6, 2017
@brahmscode
Copy link
Author

brahmscode commented Oct 6, 2017

@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 [email protected]: 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 [email protected] 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" "[email protected]"
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.

@brahmscode
Copy link
Author

@rnchamberlain This is the stacktrace got while running npm install.

[email protected] 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.
[email protected] /vzwhome/mahalbr/NodeAgent
âââ [email protected]

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 [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN [email protected] No repository field.

@rnchamberlain
Copy link
Contributor

@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.

@brahmscode brahmscode reopened this Oct 6, 2017
@brahmscode
Copy link
Author

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

@rnchamberlain
Copy link
Contributor

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.

@brahmscode
Copy link
Author

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 > [email protected] 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.

@rnchamberlain
Copy link
Contributor

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

@richardlau
Copy link
Member

@brahmscode Are you able to install any other npm that requires compilation (e.g. heapdump)? What does make --version print?

@brahmscode
Copy link
Author

brahmscode commented Oct 9, 2017

@richardlau Yes I am able to install other packages and my make version is 3.81 and it runs on python 2.6.6

@brahmscode
Copy link
Author

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.

@rnchamberlain
Copy link
Contributor

A couple of other things to try (no guarantees, I just found these by searching similar issues):

  1. Run npm cache clean
  2. 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

@brahmscode
Copy link
Author

brahmscode commented Oct 10, 2017

@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 [email protected]~install: unsafe-perm in lifecycle true
npm verb lifecycle [email protected]~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 [email protected]~install: CWD: /vzwhome/mahalbr/NodeAgent/node_modules/node-report
npm info lifecycle [email protected]~postinstall: [email protected]
npm verb unlock done using /usr/apps/spev/.npm/_locks/staging-2574547f28aa2911.lock for /vzwhome/mahalbr/NodeAgent/node_modules/.staging
[email protected] /vzwhome/mahalbr/NodeAgent
âââ [email protected]
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 [email protected]: 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 [email protected] 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

@rnchamberlain
Copy link
Contributor

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.

@brahmscode
Copy link
Author

@rnchamberlain. Tried that approach too. No luck on it too.

@refack
Copy link

refack commented Mar 19, 2019

FTR: make ✖ ERR Missing Makefile / Bakefile is the output of an npm package called make. That confuses node-gyp and breaks the build.

@kavishkafernando
Copy link

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.

@mhdawson
Copy link
Member

@richardlau can you review/comment

@richardlau
Copy link
Member

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.

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

6 participants