Cannot find module 'C:\xampp\htdocs\laravel-mix\bin\cli.js - vue.js

i have an error " Cannot find module 'C:\xampp\htdocs\laravel-mix\bin\cli.js' " when i try to run
npm run watch command for new laravel vue js project.
i also try to remove node_modules and package-lock.json file and reinstall npm 2 - 3 time but i cant resolve this error then please help me

Related

getting error for module that doesn't exist in Package.json in react native?

enter image description here
I am getting error for module that doesn't even exist in Package.json file. what is that and how to resolve this problem
usually i try deleting node modules and then npm install but this time i did it and got this error again
If you want to use this library then you have to install it using
npm i #twotalltotems/react-native-otp-input
Now as u said : " module that doesn't even exist in Package.json file" and you are still importing the library e.g
"import OTPInputView from '#twotalltotems/react-native-otp-input'"
thats why it's giving the error.
just remove this line "import OTPInputView from '#twotalltotems/react-native-otp-input'"
Secondly You don't need to delete node modules every time. It should be done only in swear cases.
you can simple try npm start --Reset-cache
if you have any other confusion ,feel free to ask
"npm install" only installs packages mentioned under package.json file.
As you are getting an error for the module which is not present under package.json, you are supposed to add that module name in package.json file as other modules are mentioned under "dependencies" object.
And after adding the module name you can try "npm install".
Or
You can simply try npm install for that respective package separately, it'll automatically add that module name in package.json and will install the same for you.
for example:
let's suppose you are getting an error for a package called as 'example'
npm install example

ng-zorro Error: Module not found when trying to run project

I'm using ng-zorro v14.1.1 for my angular 14.2.7. But when I try to run my angular application, I got errors when building the project looking for modules from ng-zorro and identifying it as not found even though the files existed in the project.
Here's the full view of the error:
Additional detail of the project:
Angular Electron project
Angular 14.2.7
Electron 21.2.0
Thanks in advance for helping!
I tried removing node-modules and re-install ng-zorro-antd using ng add ng-zorro-antd, and even npm install ng-zorro-antd if it makes a difference but to no avail, I'm still having the issue. Thus, can't run the project.
I have solved my problem. What I did was to install the modules that are mentioned in the error:
I ran the commands:
npm i d3-zoom --> this command gives you hint on what to do next when you're trying to run the project after the installation is finished, and it instructed me to run the next command below:
npm i --save-dev #types/d3-zoom
npm i dagre-compound
npm i d3-shape

Unable to run vue application

I created a project using below command,
npm init vue#latest
The project was created like,
vue project setup
After that run below command,
npm install
then run the below command,
npm run dev
But I got the below error,
Error
Package.json File,
package.json
I tried all the way like cleared cache but couldn't helped me. Also reinstalled the node but didn't worked. Also given full permission to the folder.
npm version - 8.7.0
node version - v16.14.2
Can anyone help me?

TypeError: Cannot read property 'NormalModule' of undefined

I am working on a big project and I cannot run it anymore because of this error:
When I run npm run serve
ERROR TypeError: Cannot read property 'NormalModule' of undefined
TypeError: Cannot read property 'NormalModule' of undefined
at VueLoaderPlugin.apply (/Users/<user>/muso-ninjas/node_modules/vue-loader-v16/dist/pluginWebpack5.js:44:47)
at webpack (/Users/<user>/muso-ninjas/node_modules/#vue/cli-service/node_modules/webpack/lib/webpack.js:51:13)
at serve (/Users/<user>/muso-ninjas/node_modules/#vue/cli-service/lib/commands/serve.js:163:22)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
Please help me because I am stuck and I would like to go with my project.
Try this first:
In your project root, run npm install. Maybe someone else on your project has changed/added a dependency, and pulling from your git repo got you the code that relies on this, but won't get you the dependency itself.
If that doesn't fix your issue, try this:
Remove the node_modules folder in your project root.
Update your Node.js version to the latest 16.x version.
2.1 Verify the update has worked by issuing node -v in the terminal.
Update your npm: Run npm i -g npm in the terminal.
3.1 Very the update has worked by issuing npm -v in the terminal.
Run npm install in your project's root folder.
If this doesn't fix your issue, you need to find help from someone else on your team.
As suggested in link from the first comment, I deleted node_modules, replaced the node-sass in package.json with "sass": "^1.26.5" and ran npm install but it didn't work.
Then I repeated the steps and removed package-lock.json as well.
This helped and the app was served properly
npm install webpack#4.39.3 --save

Vue Cli's default has console errors?

I'm trying to create a project using Vue Cli using the following lines,
$ npm install -g vue-cli
$ vue init webpack my-project
$ cd my-project
$ npm install
$ npm run dev
And in the console of the build, it has the following error,
Uncaught TypeError: Cannot read property 'indexOf' of null
at Object.extractShopifyDomain (content.min.js:14)
at Object.extractCurrentDomain (content.min.js:14)
at new <anonymous> (content.min.js:16)
at content.min.js:15
Is it an issue with the current Vue Cli or am I doing something wrong? I haven't touched any scripts or edited anything yet. How do I resolve this?
I encountered the same thing. Discovered it was the Coupons at Checkout chrome extension causing the error.
Try to update nodejs & npm. Remove node_modules folder and run npm install again. Maybe it will help.