Nodestream is not supported by this platform

#1

Hello all,

I’m inheriting a serverless project so I’m not super familiar with the whole framework so my apologies if I missed something obvious. I’m running into an issue and haven’t found a single hit about it on Google. I’ve installed the serverless cli, installed docker and setup my aws auth. However, when trying to deploy the API I’m getting this error message:

Dereks-iMac:Purchases derekmaurer$ sls deploy
Serverless: Generated requirements from /Users/derekmaurer/dev/MocaApps/noisely/Serverless_Backend/Purchases/requirements.txt in /Users/derekmaurer/dev/MocaApps/noisely/Serverless_Backend/Purchases/.serverless/requirements.txt…
Serverless: Installing requirements from /Users/derekmaurer/dev/MocaApps/noisely/Serverless_Backend/Purchases/.serverless/requirements/requirements.txt …
Serverless: Docker Image: lambci/lambda:build-python2.7
Serverless: Running docker run --rm -v /Users/derekmaurer/dev/MocaApps/noisely/Serverless_Backend/Purchases/.serverless/requirements:/var/task:z -u 0 lambci/lambda:build-python2.7 python2.7 -m pip install -t /var/task/ -r /var/task/requirements.txt…
Serverless: Packaging service…
Serverless: Excluding development dependencies…
Serverless: Injecting required Python packages to package…

Error --------------------------------------------------

nodestream is not supported by this platform

 For debugging logs, run again after setting the "SLS_DEBUG=*" environment variable.

Your Environment Information -----------------------------
OS: darwin
Node Version: 11.11.0
Serverless Version: 1.38.0

Can anyone provide any helpful tips or instructions on how I can fix this?

#2

I’ve just ran into the same problem.

Given I was deploying without issue
When I installed the plugin:

  • serverless-python-requirements

Then I saw the error “nodestream is not supported by this platform” after trying to deploy

I haven’t found a fix yet, but I’ll post if I find anything

#3

Huh, interesting that it only happened to you after installing the severless-python-requirements. I installed that as well, but I wasn’t able to even start the install without installing it because it need a package called “fs-extra”. So you were able to deploy without having the “serverless-python-requirements” package installed?

#4

I have my python files in sub-directories and I can deploy with the following config in my serverless.yml file:

      hello_world:
        handler: helloWorldDir/hello_world.hanlder_function

However, if I try to package that file up for the function like below (which I do on many other serverless apis) then I’m running into the nodestream issue:

      hello_world:
        handler: helloWorldDir/hello_world.lambda_handler
        package:
            include:
             - helloWorldDir/hello_world.py

I checked my node_modules directory and I do have the fs-extra module installed already, perhaps running

npm install fs-extra will help you out.

Edit: When my config is set to this:

        handler: helloWorldDir/hello_world.hanlder_function

Then it will deploy but the lambda errors because the python file isn’t packaged up, which in turn requires the serverless-python-requirements package which in turn is causing the deployment issue.

#5

@derek_maurer I deleted the node_modules directory and have been able to deploy with serverless-python-requirements installed.

I think the issue was to do with conflicting local and global npm package installations. Hope this helps.