TypeError: o is not a function vue 2 - npm

in dev mode everything works fine ,
but after running npm run prod I face this problem.(https://i.stack.imgur.com/eh7RQ.png)
When I run npm run dev/watch everything is working as expected, but after running npm run prod nothing is showing (https://i.stack.imgur.com/3yNrI.png)

Related

vue app not working after npm run build for production

So I created a simple app with vue and works as I expected. But since I ran npm run build and I tried to run that project from /dist directory(for produnction) I just stops. What am i missing here guys?

My changes made in Dashboard.vue aren't being saved (Laravel Jetstream Inertia.js)

This is my first day working with this so I'm not sure what's going on.
When I start up my laravel project and add jetstream(inertia.js) and make changes to my resources/js/Dashboard.vue file, I open my local server and go to /dashboard and those changes don't appear on the website.
Things I've tried:
Made sure it wasn't my development server because I was able to change welcome.blade.php
Ran npm run dev again.
Steps I made when I create the app:
1. ran laravel new ProjectName --jet
2. opened my project in VSCODE
3. ran npm install && npm run dev
4. Made changes to my Welcome.blade.php
5. Attempt at changing Dashboard.vue
When you start your application, just type the following in your terminal.
1. npm install
2. npm run dev
3. npm run prod
4. npm run watch
5. php artisan serve
And it should all work, for the question i had, all i used was steps. 1,2,4,5. But i ran into a problem later regarding something else and then ran npm run prod and it fixed.

Npm Run Script Issues Running ( Blank Line After Running & No Errors)

I logged into my codebase and tried to run a script. onEnter it doesn't run or give any errors but shows a blank line beneath. everything was working fine until I restarted it. The only things I've edited have been in a Vue file which shouldn't affect anything?
( image below )
Ive tried:
- installing npm and I've looked Here on a similar issue.
- updating and it has updated, the test command gives the same result.
- reinstalling node and the issue persists.
- running the commands in different terminal
A few days ago watching a Coding Tech video they recommended running npm config set ignore-scripts true to prevent hackers when installing npm libraries etc. However... this prevents you from running ANYTHING. run npm config set ignore-scripts false and it should be fixed. DAMN.

Vue CLI 3 - npm run serve vs serve -s dist

I've a simple vue app created with vue cli 3. When I use npm run serve command over VS Code I can display application over http://localhost:8080 with no problem. I'm using following commands to serve dist folder over localhost.
npm run build
serve -s dist
After above commands, I supposed to display application over http://localhost:5000 but I'm getting following error on IE11 and application works fine on chrome.
SCRIPT1002: Syntax error
paginator.js (11,1)
Here is the paginator.js codes which IE11 gives error.
11 class Paginator {
12 constructor(screen) {
13 this.pointer = 0;
14 this.lastIndex = 0;
15 this.screen = screen;
16 }
What is npm run build doing and why does application run with no error after npm run serve command but does not run after npm run build command in IE11?
I have polyfills installed so that I can use application on IE11 after npm run serve and here is my script tag from PolyFill.io
<script crossorigin=anonymous src="https://polyfill.io/v3/polyfill.min.js?features=Symbol%2Ces2015%2CArray.from"></script>
npm run build minifies/compacts your source, and creates a dist subfolder. Your issue is likely that IE11 isn't able to handle the minified JS.
Minified JS looks like this:
(function(t){function e(e){for(var n,r,l=e[0],i=e[1],c=e[2],p=0,u=[];p<l.length;p++)r=l[p],Object.prototype.hasOwnProperty.call(o,r)&&o[r]&&u.push(o[r][0]),o[r]=0;for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n]);d&&d(e);while(u.length)u.shift()();

skeleton-typescript-webpack fails when running npm start or npm run build on Windows 7

I'm running Windows 7 64bit with Node v6.5.0 and NPM 3.10.3. I ran npm install in the skeleton-typescript-webpack folder and all the packages installed fine. When I run any commands that call webpack though, I get the errors below.
When I run npm run build I get this error:
When I run npm start I get this error:
As you can see, the command that is run before the npm build error happens is concerning webpack, and same with the command that is run before the npm start error happens.
Anyone have an idea on how to fix this?
The skeleton skeleton-typescript-webpack uses TypeScript 2.0 for compilation.
This gives tries to compile adm-zip which is in the selenium-webdriver node module. And this gives an error on a break statement after a return statement.
The file .\nodes_modules\selenium-webdriver\node_modules\adm-zip\zipEntry.js gives the issue. You have to comment out two break; statements in the file on line 96 and line 115. After this you get a correct build.