node-red/node-red-nodegen

Error: Cannot find module 'q'

j2l opened this issue · 2 comments

j2l commented

What are the steps to reproduce?

On my local linux machine:
Wget https://raw.githubusercontent.com/kazuhitoyokoi/nodegen-handson/master/swagger.yaml
node-red-nodegen swagger.yaml (no error)
link/copy to the node-red /node-modules (in a LAN rapsi docker container in my case)
restart node-red

What happens?

In Node-Red logs:
8 Feb 20:10:10 - [warn] [node-red-contrib-iss-location/iss-location] Error: Cannot find module 'q'
In the Palette:
image
I had the same behavior with another swagger 2.0 openapi yaml file.

What do you expect to happen?

image
as explained at https://kazuhitoyokoi.medium.com/procedures-to-develop-node-red-node-from-openapi-document-8685fdc7e90a (nodegen tutorial I followed)

Please tell us about your environment:

  • Node generator version: 0.1.0
  • Node-RED version:1.2.6
  • Node.js version: 10.19.0
  • npm version: 6.14.4
  • Platform/OS: PopOS (Ubuntu) 20.04 for nodegen, Rapsi+DockerContainer for node-red
  • Browser: FF 85 Linux

Attached: the iss-location nodegen result folder
node-red-contrib-iss-location.zip

[EDIT] : Working now, with the same ISS package, no re-upload. And node-red-nodegen http://petstore.swagger.io/v2/swagger.json also worked.

You edited to say it's working. Can the issue be closed ?

j2l commented

yeah, I guess so.
I wonder if someone else had the same issue.
But you're right, it's fixed for now.