So this is lately one of the most popular issues in discord.js community. Appears after updating to d.js v13.7.0 and higher. While it works perfectly on a PC or etc., it fails to run on Heroku hosting with the following message:
Error: Cannot find module '../Modal'
This is clear that the issue is on Heroku's side, because Modal file can be found in discord.js dependency folder in node_modules.
I have NodeJS v18.3.0, have tried reinstalling discord.js with multiple methods, nothing helped.
I wasn't able to find any solutions to the problem, have anyone over here found the solution?
Im pretty sure that you didn't create a file called .gitignore because it shows that your problem is on the folders '../Modal', Before deploying it to heroku, you should ignore the 2 files on your project.
node_modules
.env (if you have)
To remove these 2 on your deploying, create a file on your main folder named .gitignore and right down the following:
node_modules
.env
Related
I wonder is there any way to make Heroku to read specific file instead of node modules. I'v made scraper with puppeteer but there is an error, I have found why thet error is appearse and I'v changed file in puppeteer files(in node_modules) so it works on my machine, but how can i make this changes on heroku if i dont have access to node_modules on heroku. So i wonder is there any way to make heroku to read specific file instead of reading this file from node_modules? Thanks.
I have deleted a folder named accounts from my Django project and tried to run the file, but getting this error
"ModuleNotFoundError: No module named 'accounts'"
Even though I have deleted manually, it's asking me to delete the paths as well. How to get over from this error?
How DjangoStarter said, check your installed apps and the imports in other apps.
My Vue project is running fine locally, but when upload it to github repo, download it back from there and npm install, then npm run dev, it throws error Module build failed: Error: No ESLint configuration found.
When I unzip my downloaded repo-files, there's no .eslintrc etc. files that are present when I'm uploading my project, and to my knowledge that is one reason causing this ESLint problem.
Here's the very basic vue init webpack HelloWorld.vue uploaded to my test-repo without any modifications to show how it fails to build after downloading.
Link to my test repo to reproduce the error: https://github.com/tuuchen/vue-movie-app
How can I fix this issue with eslint?
EDIT: I made a fresh project without eslint, and when downloading it from my git repo, It's throwing Failed to compile error, asset optimization[copy-webpack-plugin] WARNING - unable to locate '<path>\myvueapp\static'
EDIT 2: Also .postcssrc is missing when initiating npm install
EDIT 3: Problem solved. I was using webpack for creating my vue project, and it caused all kinds of issues when downloading the project back from git repo. npm install -g #vue/cli did a project that worked without issues.
Sorry for being such a noob.
This issue came up as I created a new project by copying from another project on my Mac. However, the hidden files were not copied!
Solution
The issue got resolved by having these hidden files as well in the new project:
.babelrc,
.editorconfig
.eslintignore
.eslintrc.js
.postcssrc.js
There are other solutions that many have proposed in this Vue Issue that you can refer to if this does not solve your problem.
In my case, I just delete the folder Node.Js and try reinstall node modules using yarn/npm.
if it still did not work, you can try to add file .eslintignore on the root folder and add there the path to the folder we want to omit.
For example, in this scenario, .build/test.js is the desired file to allowlist. Because all dot-folders and their children are ignored by default, .build must first be allowlisted so that eslint becomes aware of its children. Then, .build/test.js must be explicitly allowlisted, while the rest of the content is denylisted. This is done with the following .eslintignore file:
# Allowlist 'test.js' in the '.build' folder
# But do not allow anything else in the '.build' folder to be linted
!.build
.build/*
!.build/test.js
more documentation https://eslint.org/docs/user-guide/configuring/ignoring-code#the-eslintignore-file
I have a project using VueJS, Webpack and some JS Plugins, like Jquery Datatable.
Everything goes well, i have a package.json where has all depedences. Here we a team with 10 developers. Not all of them work with this project, there are some developers that touch in this project every month. They already have all project, nothing changes with package.json dependences, but when i build the project, there are some strange errors in terminal, like not found some dependences(?) even all folders being there. Nothing changed with node_modules folder. If i delete it and run npm install, it works. The question is: "Why does the folder node_modules "lose" the references when it is a long time without moving the object?"
Thanks!
I was trying to use NEXE to bundle my express 4 project. The bundling was sucessful, and a http_server.nex was generated. However, when I was trying to run the bundled file, I got the following error:
Error: ENOENT, no such file or directory '..../release/types/mime.types'
And I checked the release folder, the types folder and the mime.types file was never created. Any suggestions?
Or in general, what's the best way to deploy node project in a package? I tried several tools but none seem work so far. We need some level of obfuscation / compilation to have some code security.
Thank you in advance!