You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to use Nodes to expose an API endpoint.
But when I try to add express as a package, I'm getting a bundling error and it is impossible to load the project.
To Reproduce
Steps to reproduce the behavior:
Add package "express"
Require it in one node
Save project
Close Nodes
Launch Nodes
Load Project
See "Bundling error" message
If I launch Nodes from the terminal, I'm seeing the following error
ERROR in ./node_modules/express/lib/request.js
Module not found: Error: Can't resolve 'net' in 'C:\Users\BenjaminVadant\Documents\Nodes\my-first-project\node_modules\express\lib'
Expected behavior
I'm expecting to see the error message in the editor and access to the editor to fix it.
From the error, I'm thinking that express is not (& will not be) supported as nodes code is executed client side.
Do you think it will be possible in the future to select a node to be executed server side ? It would be interesting to access system-level functionalities such as network, system usage....
Environment Information:
nodes: 1.0.0-beta.2
os: win32
node: 12.18.3
electron: 11.1.0
chrome: 87.0.4280.88
Related Issues
The text was updated successfully, but these errors were encountered:
It looks like you're trying to install express which is in turn using net, probably not accessible in the browser. If you have trouble when reopening, you can manually delete express from package.json dependencies.
Nodes are meant to be for browser environments for now so you'll have to run your express server in a separate node.js process. It might be hard to provide a secure way to run server-side code in the current context but thanks for the suggestion.
Describe the bug
I'd like to use Nodes to expose an API endpoint.
But when I try to add express as a package, I'm getting a bundling error and it is impossible to load the project.
To Reproduce
Steps to reproduce the behavior:
If I launch Nodes from the terminal, I'm seeing the following error
Expected behavior
I'm expecting to see the error message in the editor and access to the editor to fix it.
From the error, I'm thinking that express is not (& will not be) supported as nodes code is executed client side.
Do you think it will be possible in the future to select a node to be executed server side ? It would be interesting to access system-level functionalities such as network, system usage....
Environment Information:
Related Issues
The text was updated successfully, but these errors were encountered: