sails.js stopped to work after cloning from repository - npm

After adding to git and cloning sails.js application back to another desktop my application stopped to work correctly. e.g. I am able to successfully run sails lift command, however when trying to load login page I see that the page is not loaded properly:
and I receive multiple errors in browser console (back end console is ok and does not drop any errors):
cloud.setup.js:13 Uncaught ReferenceError: Cloud is not defined
at cloud.setup.js:13
Uncaught ReferenceError: parasails is not defined
at ajax-button.component.js:12
ajax-form.component.js:20 Uncaught ReferenceError: parasails is not defined
at ajax-form.component.js:20
Uncaught ReferenceError: parasails is not defined
at js-timestamp.component.js:15
...
I checked node_modules folder and parasails is included there.
I didn't include node_module to my repo as I can always run npm install after cloning.
I managed to create and successfully run a new sails.js application on my desktop without any issues.
So, there must be an error with the files I pushed or didn't pushed to git.

In .gitignore file I had dependencies/ folder excluded.
That rule was excluding any file in assets/dependencies subfolder, where a number of sails.js files are located, e.g. parasails.js, etc.

Related

Vue 3 browser caching doesnt pick latest files

We have a build.js code in our project which makes a duplicate of our client directory and adds a folder inside src.
example -
client/src/components will become dist/src/abcxy/components
abcxy will change every time we create a new build.
Now the problem is that the browser tries to find the old dist files from the cache and is unable to find them, instead of finding new files it gives an error in the console.
The error changes depending on the browser I am using
EXAMPLE ERROR - Failed to load ‘http://localhost/src/pbtsg/components/report/reports.js’. A ServiceWorker intercepted the request and encountered an unexpected error.

Meteor application not deploying, Errors prevented startup

I cloned the rocket chat repo on GitHub and ran meteor npm install && meteor, it wasn't able to deploy the app and got stuck, so I exited and tried meteor but it throws the same error:
Errors prevented startup:
While loading plugin `Livechat` from package `rocketchat:livechat`:
child_process.js:635:11: Command failed: C:\web dev\RocketChat\Rocket.Chat\packages\rocketchat-livechat\plugin/build.bat
'C:\web' is not recognized as an internal or external command,
operable program or batch file.
at checkExecSyncError (child_process.js:635:11)
at execSync (child_process.js:671:15)
at module (packages/Livechat/plugin/build-livechat.js:20:2)
at fileEvaluate (packages/modules-runtime.js:336:7)
at Module.require (packages/modules-runtime.js:238:14)
at require (packages/modules-runtime.js:258:21)
at <runJavaScript-36>:94:1
at <runJavaScript-36>:99:3
Your application has errors. Waiting for file change.
Started MongoDB.
And gets stuck there.
The issue here is with the space in the name of your web deb folder. This should probably be compensated for in the package code, but since it isn't the easiest solution would be to rename your folder to not have a space in the name and then maybe file a issue in the appropriate repo.

Direct nested URL fails with error "Uncaught SyntaxError: Unexpected token '<'" - Create React App/React-router-dom/Netlify

I've got an app created with create-react-app (with react-router-dom) and deployed with Netlify. Whenever I try and route to a page through a direct (nested) URL, such as 'https://jvcparry.com/products/indie', it fails to load a page and gives the errors
Uncaught SyntaxError: Unexpected token '<' main.e3eaf229.chunk.js:1
However when I navigate the deployed version through links, everything loads fine. I also don't get this error when I'm running the app locally, which I guess means it must be something to do with deployment?
I've trawled through all the other posts I can find with this error, and also things to do with Netlify/CRA deployments. I've got a _redirects file with '/* /index.html 200' in it in my /public folder, and I've tried refactoring my routes to use code-splitting but that's made no difference.
My code is on github here: https://github.com/NatClamp/jvcparry
Deployed version is here: https://jvcparry.com/
and if you go to https://jvcparry.com/products/indie you'll see the error I'm getting.
Can anyone shed any light on this? Thanks in advance
A rigid but working solution is to update _redirects file this way:
/*/main.e3eaf229.chunk.js /main.e3eaf229.chunk.js 200
/* /index.html 200
You can also be updating this file every time you build new js bundle during your CICD run

How to avoid build failure from ESLint violations with react-scripts/create-react-app?

I created a fresh project using CRA, and then added a custom eslint config with a single rule, no-console, and set it to error log level.
When running yarn start to do development, and putting in a console log, the whole build fails and I get a generic error page saying the build failed because there was a console log. But, I put the log there to debug the app, and this isn't a production build.
I also tried seeing if this could be related to custom eslint configs so I violated the rule-of-hooks rule that is default with CRA and saw the same thing happen.
How can I develop with a linting error present?

Uncaught syntax error: unexpected token < error

I'm using service worker and caching with workbox using webpack for a vuejs app. While it worked fine until now, when I pushed new changes to our app, the app breaks after reloading the page and gives this error. Also, in the network tab, I see that it is requesting a non-existing app.js build file which was a previous deploy file. How do I solve this?
If you observe the image, you can see that the request is going to older app.js file while in the dist folder to the left, the hash of app.js bundled is different.
error image