I have a node.js application that uses socket.io and express. When I deploy the application I get the error Cannot find module 'indexof'. I read about the issue here but the thing is that I don't check-in my node_modules folder to heroku so not really sure how I can fix it. Any ideas ?
Related
I'm trying to learn the MERN stack, so I followed the starter guide on MongoDB.com. That all worked fine locally, but when I tried hosting it on Vercel (to get an idea of the limitations and challenges), it spat out a pretty confusing error:
Error: Module build failed (from /vercel/c502a1cc836b238f/.build-utils/.builder/node_modules/#zeit/ncc/dist/ncc/loaders/relocate-loader.js)
Here's the structure of the project
client
node_modules
public
src
index.js
App.js
package.json
server
server.js
package.json
db
conn.js
package.json
vercel.json
node_modules
.gitignore
The react app was made with create-react-app, and then I just copy-pasted the instructions from MongoDB. The server was made manually.
I tried installing and uninstalling both #vercel/ncc and #zeit/ncc, but neither seemed to change anything.
Thanks for taking the time to read this.
I'm using https://nx.dev/angular to develop a microservice app but now I'm getting the following errors:
ERROR in /home/vagrant/document-registry/node_modules/#graphql-tools/git-loader/index.esm.js
Module not found: Error: Can't resolve 'child_process' in '/home/vagrant/document-registry/node_modules/#graphql-tools/git-loader'
This particular subproject is an Angular app and I don't know how to prevent node modules that are not part of the browser API from being packaged since the entire application is being used with one package.json file. I'm running this in a vagrant environment.
Can anyone point me in the right direction on this?
i trying push my node application
but it is fail with this error message Error: Cannot find module 'caw'
my local environment works well however cloudfoundry environment don't work
If you have experienced the same problem, please help me.
I try to deploy my node app on bluemix using cf. It says done uploading but then failed and error uploading application and an unknown error occurred. I am not sure where the problem is. I have mentioned the npm and node versions in my package.json file. Has it got to do anything with the fact that I am using socket.io in my app?
I have a nodejs app on openshift but I am getting a startup error saying it can't find a module that actually is in the app-root/run-time/repo/node_modules folder. App works locally just fine. Appreciate any insight.