Node.js in Repl.it tries to install "https:" on run[Solved]
I've been working on a new project in Repl.it, and I had to use the shell to run the app because whenever I tried using the Run button, Repl.it would do the following:
Repl.it: Updating package configuration npm install https: // And then an error would show up here, saying that the link is invalid.
This makes the Run button useless. Are there any workarounds/fixes for this, aside from using the shell?
Reason: Replit tries installing client-side modules with
public/index.js, which results in an error, since these are not NPM modules. The solution is to add a
.replit file, if you don't already have one, and add the following text:
run="node ." [packager] ignoredPaths=["public"]
where "public" is the folder where your client-side code typically is in. This will make the packager ignore files in
/public, which fixes the issue.