Clinton
Clinton4w ago

Import "jsonpath" package issue

I am trying to use the NPM package "jsonpath" in a node and keep getting the following error. Cannot find module '../include/module.js' Require stack: - /usr/src/app/bucket/builtNodes/test-node-1727446444009/1727446559904.cjs
2 Replies
AI Support
AI Support4w ago
AI Support Bot Information
<@1207737439440085063> you can react on the relevant answer (message) with a ✅ in this thread when you think it has been solved, by the bot or by a human! Anyone can react on this message with a ❌ if the GPT bot is unhelpful or hallucinating answers. Please note: Team members will review and answer the questions on best efforts basis.
AI Support
AI Support4w ago
AI Response
The error you're encountering, "Cannot find module '../include/module.js'", can happen due to a variety of issues related to how modules are referenced or missing dependencies. Here are some steps to troubleshoot and potentially resolve the error: 1. Verify Dependencies: Ensure that all dependencies, including the jsonpath module, are installed correctly. You can do this by running npm install in your project directory. 2. Check Module Resolution Path: Sometimes, the problem might be due to the Node.js module resolution path. Ensure that the path to the module is correct and accessible. 3. Relative Path Issue: The error indicates that the module system cannot find a file specified by a relative path (../include/module.js). Ensure that the file exists at the specified path. You might need to adjust the path or check if the file is missing or named incorrectly. 4. Clear Node Modules and Reinstall: Sometimes conflicts within the node_modules directory can cause issues. Try removing the node_modules directory and then reinstalling the dependencies using npm install. 5. Updating Dependencies: Make sure that the jsonpath package and other dependencies are up to date. Run npm update to update the packages. 6. Use Absolute Paths: If possible, try changing relative paths to absolute paths. This can sometimes resolve issues with module resolution. If the issue persists, please provide more details about your node setup or consider reaching out for support through the BuildShip app's support request feature. More detailed information can potentially be found in the BuildShip documentation【4:0†source】【4:1†source】.
BuildShip AI Support