Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

node_modules/search-replace-db/srdb.cli.php: No such file or directory #43

Open
davemac opened this issue May 8, 2014 · 6 comments
Open

Comments

@davemac
Copy link

davemac commented May 8, 2014

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 to srdb.cli.php ?

@getdave
Copy link
Owner

getdave commented May 9, 2014

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

@davemac
Copy link
Author

davemac commented May 9, 2014

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?

@davemac
Copy link
Author

davemac commented May 9, 2014

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?

@getdave
Copy link
Owner

getdave commented May 11, 2014

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 #44 ? Is so can you close the issues?

@davemac
Copy link
Author

davemac commented May 12, 2014

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.

@davemac
Copy link
Author

davemac commented May 12, 2014

#44 is a separate issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants