Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

michaelsoares's avatar

I try to change .vue file but nothing changes

I try to change .vue file but nothing changes, it doesn't reflect on browser, I already tried to clear cache on client side and server side I already deleted views What should I do to reflect changes on my vue components? thank you

0 likes
42 replies
tykus's avatar

Are you running npm run watch?

michaelsoares's avatar

@tykus { "dependencies": { "axios": "^0.21.4", "core-js": "^3.20.2", "style-loader": "^2.0.0", "v-img": "^0.2.0", "v-tooltip": "^2.1.3", "vue": "^2.6.14", "vue-chat-scroll": "^2.0.0-alpha.4", "vue-loading-overlay": "^3.4.2", "vue-toastification": "^1.7.14" }, "devDependencies": { "@babel/core": "^7.16.7", "@babel/preset-env": "^7.16.7", "babel-loader": "^8.2.3", "css-loader": "^5.2.6", "vue-loader": "^15.9.7", "vue-template-compiler": "2.6.14", "webpack": "^5.65.0", "webpack-cli": "^4.9.1", "webpack-dev-server": "^3.11.3" }, "scripts": { "build:prod": "node" } }

tykus's avatar

@michaelsoares it is not that simple as pasting in lines from another package.json as @sinnbeck suggests. For example, you don't have Laravel Mix as a dependency. This is why I ask how old is the project?

This script you do have is npm run build:prod - this might be enough for building the bundle with newly compiled Vue components

EDIT what is the github link?

tykus's avatar

@michaelsoares

I don't want to tell

Okay 🤷‍♂️

Just revert your package.json and then run npm install; finally, npm run build:prod

michaelsoares's avatar

@tykus npm WARN project No description npm WARN project No repository field. npm WARN project No license field.

audited 686 packages in 3.729s

43 packages are looking for funding run npm fund for details

found 9 vulnerabilities (2 low, 6 moderate, 1 high) run npm audit fix to fix them, or npm audit for details

tykus's avatar

Typical npm noise. For now, jsut run the build:prod script.

michaelsoares's avatar

@tykus if CTRL^C npm ERR! code ELIFECYCLE npm ERR! errno 3221225786 npm ERR! @ build:prod: node npm ERR! Exit status 3221225786 npm ERR! npm ERR! Failed at the @ build:prod script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

tykus's avatar

@michaelsoares your installed node and npm versions are likely incompatible with the dependencies; what are you running?

tykus's avatar

Maybe try updating them; we're up to v17.x and v8.x respectively now.

EDIT actually looking at the package.json code above again; the build:prod command is useless, it just runs node command... Is this repo reliable at all????

michaelsoares's avatar

@tykus npm install n -g npm ERR! code EBADPLATFORM npm ERR! notsup Unsupported platform for [email protected]: wanted {"os":"!win32"} (current: {"os":"win32","arch":"x64"}) npm ERR! notsup Valid OS: !win32 npm ERR! notsup Valid Arch: undefined npm ERR! notsup Actual OS: win32 npm ERR! notsup Actual Arch: x64

michaelsoares's avatar

@tykus what do you mean? EDIT: I installed the lastest verisons as you said, what should I do now?

tykus's avatar

@michaelsoares the script build:prod does nothing. It runs the command node only... this opens a Node REPL shell, it does not build the bundle

Sinnbeck's avatar
Sinnbeck
Best Answer
Level 102

@michaelsoares just a thing you can try npx webpack

Or add a script "build": "webpack" to package.json and run npm run build

Might not work, but it's worth a shot

2 likes
michaelsoares's avatar

@Sinnbeck thank you so much, installing the latest versions of nodejs and adding the script "build": "webpack" to package.json made the "npm run build" work

Please or to participate in this conversation.