When creating a plugin action and enabling “node modules”, I’ve added a few npm modules via a custom package.json:
{
"dependencies": {
"module1.js": "*",
"node": "10.16.3",
"module2": "2.0.11"
}
}
Bubble successfully declares “Deployment package is up to date” after inserting the custom package.json, but when I import module2 into the first Action Code function, the Bubble plugin editor throws the error “This code cannot be interpreted as javascript…”
No errors when defining a const based on module1.js:
const module1 = require("module1.js");
As soon as module2 is imported via import
, the editor throws the error:
import {module2} from "module2";
When the line is commented out, the error goes away. Any ideas on importing module2 into the action code? (module2 is technically a .ts npm vs. module1.js)