Closed n8sabes closed 8 years ago
I followed these instructions after the ones in the main README didn't work. Even then I'm still getting this error:
$ serverless serve start
WARNING: This plugin was requested by this project but could not be found: serverless-serve
{ [ServerlessError: Command Not Found] name: 'ServerlessError', messageId: 1 }
After a little trial and error I discovered that it would work if I manually created a directory at plugins/node_modules
and then did npm install serverless-serve
inside the plugins
directory.
@jagthedrummer I also had the same problem, that is caused by npm installing the node module to "../node_modules/serverless-serve" instead of "node_modules/serverless-serve", relative to the plugin folder. I did not understand really why, but after some retries npm started to install the plugin to the correct folder.
Yeah, npm checks for package.json
in current folder, and if there is none, but there is some package.json
in parent folders, the parent folder is used as installation path. npm install --prefix=.
forces to use current folder.
Readme got updated.
While it only took a few minutes to figure it out, here are two minor ReadMe wiki improvement suggestions based on my trial and error to get this up and running:
From the main project directory (not the plugin directory), start the server.