Mix was used before network restriction but now it's not usable and I have errors
I know for some of you it may look similar. But now it's regarding Laravel Mix (and Laravel 6):
I can't use npm commands because of network restrictions that were applied recently.
The previous developer did play around with Mix and used a bit of npm commands(before the restriction), so now I see the node_modules folder.
But now there is an error from a module called css-loader. I believe it's caused because of a known bug that's even confirmed in Mix's github : When using css-loader version 8.0.0 it won't work. I believe the previous developer updated from version 7 to 8 unknowingly and now we get an error in the console.
But since we can't use npm anymore, can I simply delete the entire node_modules folder and delete the index.js file from public (and maybe even package.json and package-lock.json)? Or there may be other consequences for doing so now, that Mix has already been used?
@Ligonsker No need for mix. Its is only for compiling and using npm packages. You can just write plain javascript in js files placed somewhere in the public folder.
@Ligonsker As long as you dont need them. So no bootstrap and no axios. But you can use the built in fetch api in the browser if you need ajax request. So I see no reason you should no be able to :)
@Sinnbeck thanks! What's confusing to me is that we are using bootstrap, but then I see it's in devDependecies. So perhaps they're either using the npm's dev environment in production (They just copy-paste lol), or, they actually load bootstrap from the source files somewhere?
Edit: There is also usage of jquery! (Forgot to add, now added if you look up again).
So I am not sure what's going on haha
@Ligonsker It is common to add it to dev dependencies. They probably just install everything in production and build it. If you still want bootstrap, you need to download it and put it manually in /public and then reference it in a script tag on the page
@Sinnbeck thanks, that's what I did, removed anything to do with npm/Mix and added the minified files of bootstrap and jquery and it's working. nothing seem to be broken yet :)