Are you running npm run watch?
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
@tykus yes, it says "missing script: watch"
@michaelsoares what is your stack; is this a Laravel app or are you using Vite?
@tykus laravel app
@michaelsoares Can you share your package.json file?
@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" } }
@michaelsoares you are missing several scripts https://github.com/laravel/laravel/blob/8.x/package.json#L4
@michaelsoares how old is this project?
@Sinnbeck I already added those lines, what should I do now?
@tykus I picked the project on github, I'm not sure, but it's 2 months old or less
@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 I don't want to tell
@tykus well spotted 👍
I don't want to tell
Okay 🤷♂️
Just revert your package.json and then run npm install; finally, npm run build:prod
@michaelsoares then ask whoever made it how you are meant to compile it. Or set up mix
npm install laravel-mix --save-dev
touch webpack.mix.js
@tykus what does revert mean?
@michaelsoares undo the changes suggested by @sinnbeck where you copied the scripts Object from the Laravel repo
@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
Typical npm noise. For now, jsut run the build:prod script.
@tykus it gets stuck
@michaelsoares without an error message?
@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 no error
@michaelsoares your installed node and npm versions are likely incompatible with the dependencies; what are you running?
@tykus I'm running Laravel, composer and npm
@michaelsoares I meant what versions of node and npm ???
@tykus Node: v14.15.3 NPM: 6.14.9
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????
@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
@tykus what's the correct command?
@michaelsoares https://nodejs.org/en/download/
Still the build:prod script in package.json will be useless...
@tykus the latest versions are installed
@michaelsoares why not ask the owner of the repo? I assume the creator was able to build somehow
Still the
build:prodscript inpackage.jsonwill be useless...
@tykus what do you mean? EDIT: I installed the lastest verisons as you said, what should I do now?
@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
@tykus so what command should I use?EDIT: I asks me for npm run to list all command
@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
@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
@michaelsoares and your vue files work ?
@Sinnbeck yes ^^
@michaelsoares good to hear. Set the thread as solved by marking one of many answers as best
Please or to participate in this conversation.