Comments (23)
This was quite tricky, but I realize what's going on!
> [email protected] postinstall /tmp/build_20zj9urr4tkew/node_modules/neo4j
> npm run build
sh: npm: not found
Heroku doesn't come with npm
available to npm scripts. Very strange this way. We use npm in multiple ways during our top-level app's install scripts, so we had worked around this by simply adding npm as a dependency itself.
This lib should absolutely work on Heroku without workarounds, so I'll fix this. In the meantime, would you be able to simply add npm as a dependency to your project?
I'll also bug Heroku to ask why npm isn't available. Thanks for reporting!
from node-neo4j.
Great! Your suggestion worked like a charm.
Thanks,
-Eric
from node-neo4j.
Hey @ethul, this seems to be fixed for me. Can you test it from your app too? (By removing the explicit npm dependency and redeploying.) Thanks!
from node-neo4j.
Thanks @aseemk I will test this on my next deploy and report back.
from node-neo4j.
Hi @aseemk, I just ran a deploy and still see the error.
from node-neo4j.
Thanks for testing @ethul! Okay, I'll continue working with Heroku to fix this.
from node-neo4j.
Welcome @aseemk, keep me posted. I am happy to re-test.
from node-neo4j.
Hi everyone,
I encounter exactly the same error on Heroku with the version 0.2.19 or node-neo4j
sh: npm: not found
npm ERR! [email protected] postinstall: `npm run build`
npm ERR! `sh "-c" "npm run build"` failed with 127
Any news?
Thank you very much
from node-neo4j.
Sorry @athieriot, I haven't made time to do this yet. You're aware of the workaround mentioned above, of simply adding npm
as a dependency
in your package.json, yes?
from node-neo4j.
Yeah the temporary fix is working anyway :) Thank you.
After looking around, though, I think it should be fix in the corresponding Heroku buildpack.
There is a reported issue and a pending Pull Request on the project.
Let's see how that goes.
from node-neo4j.
Yes, it's indeed Heroku's Node.js buildpack that should be fixed. Great to hear the workaround works for now!
from node-neo4j.
Personally, I think precompiling the javascript in the next version submitted to npm and removing the build command would be simplest.
from node-neo4j.
Hi !
Just to warn you that it seems the workaround is not working anymore with Node.js 0.10.x
from node-neo4j.
Sorry for the delay in responding, @athieriot, but yes, you're right! Looking into this now.
@flipside: you might be right. =)
from node-neo4j.
Okay, fixed as @flipside recommended; installation of this library now works on Heroku out-of-the-box even with Node 0.10. Thanks for the heads-up @athieriot!
from node-neo4j.
Really great!
Thank you
from node-neo4j.
No prob at all.
Forgot to mention: this pre-compiled version is published on npm as 0.2.20 now, so be sure to update your package.json and/or npm-shrinkwrap.json if you need to.
from node-neo4j.
@aseemk problem still continues on heroku;
I just tried it one machine with 0.2.20 and included npm as dependency then it worked
from node-neo4j.
Very strange @zishon89us. You shouldn't have had to do that, but it's good that at least it's working for now. If you're still interested in figuring out the issue, let me know. Otherwise, let me know if it stops working again.
from node-neo4j.
@aseemk I would try it on other machine, will update you soon.
from node-neo4j.
Hi there:
I'm having the same problem, only that in my case, I'm trying to execute a "preinstall" script, calling "npm install ./src/" to build a package that's below my package root....so i don't know how could i add npm as dependency......
npm install ./src/
sh: npm: not found
npm ERR! [email protected] preinstall:npm install ./src/
Any help will be very much appreciated
from node-neo4j.
@sonoman: you're having the same problem, meaning node-neo4j won't install on Heroku for you?
Or do you mean you're seeing a similar error unrelated to node-neo4j? The error sh: npm not found
refers to the fact that npm isn't installed globally on Heroku at build-time. So adding it as a dependency means adding it to your package.json. E.g.:
"dependencies": {
"npm": "1.x"
}
from node-neo4j.
that's the case (I'm doing something similar and getting the same problem).
Thanks for the suggestion, it worked fine ;)
On Mon, May 6, 2013 at 4:39 PM, Aseem Kishore [email protected]:
@sonoman https://github.com/sonoman: you're having the same problem,
meaning node-neo4j won't install on Heroku for you?Or do you mean you're seeing a similar error unrelated to node-neo4j? The
error sh: npm not found refers to the fact that npm isn't installed
globally on Heroku at build-time. So adding it as a dependency means adding
it to your package.json. E.g.:"dependencies": {
"npm": "1.x"}—
Reply to this email directly or view it on GitHubhttps://github.com//issues/35#issuecomment-17503100
.
from node-neo4j.
Related Issues (20)
- Can We omit the callback of tx.commit() ? HOT 6
- neo4j 3.x HOT 1
- Transaction expiration time depends on server timestamp HOT 1
- GraphDatabase instance does not have access to functions HOT 9
- TypeError: Uncaught error: Cannot read property 'length' of undefined HOT 3
- README broken link HOT 1
- multiple statements HOT 4
- basic example fails HOT 3
- Create DataBase Neo4j with node js HOT 2
- resultDataContents HOT 8
- Callback function not working when running with mocha/chai HOT 2
- Cannot create new node. HOT 1
- TypeError: Error.captureStackTrace is not a function HOT 11
- Cannot Read Property 'length' of undefined
- neo4j.ImpermanentGraphDatabase is not implemented it seems
- Promise-wrapped fails to catch HOT 5
- Params doesn't seem to work when passing inside WHERE query
- Support for koa.
- Project status? HOT 5
- Migration from thingdom driver to Drivine. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-neo4j.