-
Notifications
You must be signed in to change notification settings - Fork 223
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
TypeError: PythonShell.run is not a function #148
Comments
You're using require. If you switch to import it should work
|
I Looked it up and apparently it's not that simple. Imports are a es6 feature so I thought they would work in node, given that even the outdated node 6.14.4 supports the vast majority of es6 features. But apparently only the latest edition of node supports imports. See https://stackoverflow.com/questions/45854169/how-can-i-use-an-es6-import-in-node So if you want to use imports you have four options:
Or you can use require, like so: let {PythonShell} = require('python-shell') |
Thanks for your help! |
@sni-J I found out you can still use require - see updated comment above. |
Today, my node modules have been reset for somewhat reason(idk) and I re-installed it. It worked properly until yesterday, but this error suddenly occurred.
+) I'm using ExpressJS
Error Message
db.js
package.json
The text was updated successfully, but these errors were encountered: