Open davemac opened 10 years ago
You'll need to ensure you have the correct dependencies installed. It's look for the script at node_modules/search-replace-db/srdb.cli.php:
which you don't have in your filesystem.
Try npm install
? Hope that helps?
See this line
https://github.com/getdave/grunt-deployments/blob/feature/advanced-search-replace/package.json#L34
Hi Dave,
Great work on this script, by the way. OK, I think I am missing something.
My local package.json for the site contains:
"devDependencies": {
"grunt": "~0.4.2",
"grunt-autoprefixer": "~0.7.2",
"grunt-contrib-imagemin": "~0.6.0",
"grunt-contrib-jshint": "~0.9.2",
"grunt-contrib-uglify": "^0.4.0",
"grunt-contrib-watch": "~0.6.1",
"grunt-rsync": "~0.5.0",
"matchdep": "~0.3.0",
"grunt-deployments": "git://github.com/getdave/grunt-deployments.git#feature/advanced-search-replace"
}
I've run npm install
and I can see search-replace-db
in my home folder at '~/npm/search-replace-db/2.2.0/package/' but it's not in my local site folder's node-modules
which is causing the error, as you said.
Sorry if i've missed something obvious?
OK I've added the following to my DevDepencies:
"Search-Replace-DB": "git://github.com/getdave/Search-Replace-DB#e26fba07b91a8c18aedffc9e277716f5e0d46043"
and that installs the package locally and gets rid of the error. Not sure why I had to explicitly add that line to my package.json
when it's referenced in your module?
Hmmmm...this could be an issue. I'm wondering whether the way npm resolves dependencies is going to mean the way Grunt Deployments uses the Search Replace DB script in this somewhat unorthadox manner isn't go to be a goer.
Did you get this working in the end and has it now resolved https://github.com/getdave/grunt-deployments/issues/44 ? Is so can you close the issues?
So the issue here still exists, in that npm installs search-replace-db in to ~/npm
rather than into the local site folder. This result in the error as per the ticket.
I got around this by manually adding the dependency to my package.json
:
"Search-Replace-DB": "git://github.com/getdave/Search-Replace-DB#e26fba07b91a8c18aedffc9e277716f5e0d46043"
But from what I can see, anyone running npm install
on the feature/advanced-search-replace-script
will get this issue, unless they manually add the dependency.
I'm testing the
feature/advanced-search-replace
branch and when I run:grunt db_pull --src="production" --dest="local"
I get the following error:
/bin/sh: node_modules/search-replace-db/srdb.cli.php: No such file or directory
From what I can see, is this something to do with
scriptPath
not having the correct path tosrdb.cli.php
?