Error when running npm run dev vs quasar dev (to use qenv)
-
Hi,
I installed qenv and cross-env, to use these you need to have different scripts in package.json with your environements: dev, prod, test etc.
But if I run quasar with:
npm run dev
vs
quasar dev
I get those errors:
warning in ./node_modules/node-libs-browser/mock/process.js There are multiple modules with names that only differ in casing. This can lead to unexpected behavior when compiling on a filesystem with other case-semantic. Use equal casing. Compare these module identifiers: * C:\dev\GCBO-repos\Kazo\node_modules\@quasar\app\lib\webpack\loader.transform-quasar-imports.js!C:\dev\GCBO-Repos\Kazo\node_modules\node-libs-browser\mock\process.js Used by 2 module(s), i. e. C:\dev\GCBO-repos\Kazo\node_modules\@quasar\app\lib\webpack\loader.transform-quasar-imports.js!C:\dev\GCBO-Repos\Kazo\node_modules\babel-loader\lib\index.js??ref--2-0!C:\dev\GCBO-Repos\Kazo\node_modules\quasar\dist\quasar.ie.polyfills.js * C:\dev\GCBO-repos\Kazo\node_modules\@quasar\app\lib\webpack\loader.transform-quasar-imports.js!C:\dev\GCBO-repos\Kazo\node_modules\node-libs-browser\mock\process.js Used by 1 module(s), i. e. C:\dev\GCBO-repos\Kazo\node_modules\@quasar\app\lib\webpack\loader.transform-quasar-imports.js!C:\dev\GCBO-repos\Kazo\node_modules\path-browserify\index.js warning in ./node_modules/webpack/buildin/global.js There are multiple modules with names that only differ in casing. This can lead to unexpected behavior when compiling on a filesystem with other case-semantic. Use equal casing. Compare these module identifiers: * C:\dev\GCBO-repos\Kazo\node_modules\@quasar\app\lib\webpack\loader.transform-quasar-imports.js!C:\dev\GCBO-Repos\Kazo\node_modules\webpack\buildin\global.js Used by 5 module(s), i. e. C:\dev\GCBO-repos\Kazo\node_modules\@quasar\app\lib\webpack\loader.transform-quasar-imports.js!C:\dev\GCBO-Repos\Kazo\node_modules\babel-loader\lib\index.js??ref--2-0!C:\dev\GCBO-Repos\Kazo\node_modules\quasar\dist\quasar.ie.polyfills.js * C:\dev\GCBO-repos\Kazo\node_modules\@quasar\app\lib\webpack\loader.transform-quasar-imports.js!C:\dev\GCBO-repos\Kazo\node_modules\webpack\buildin\global.js Used by 2 module(s), i. e. C:\dev\GCBO-repos\Kazo\node_modules\@quasar\app\lib\webpack\loader.transform-quasar-imports.js!C:\dev\GCBO-repos\Kazo\node_modules\sockjs-client\dist\sockjs.js warning in ./node_modules/webpack/buildin/module.js There are multiple modules with names that only differ in casing. This can lead to unexpected behavior when compiling on a filesystem with other case-semantic. Use equal casing. Compare these module identifiers: * C:\dev\GCBO-repos\Kazo\node_modules\@quasar\app\lib\webpack\loader.transform-quasar-imports.js!C:\dev\GCBO-Repos\Kazo\node_modules\webpack\buildin\module.js Used by 1 module(s), i. e. C:\dev\GCBO-repos\Kazo\node_modules\@quasar\app\lib\webpack\loader.transform-quasar-imports.js!C:\dev\GCBO-Repos\Kazo\node_modules\moment\moment.js * C:\dev\GCBO-repos\Kazo\node_modules\@quasar\app\lib\webpack\loader.transform-quasar-imports.js!C:\dev\GCBO-repos\Kazo\node_modules\webpack\buildin\module.js Used by 1 module(s), i. e. C:\dev\GCBO-repos\Kazo\node_modules\@quasar\app\lib\webpack\loader.transform-quasar-imports.js!C:\dev\GCBO-repos\Kazo\node_modules\node-libs-browser\node_modules\punycode\punycode.js
my package.json scripts looks like this:
"scripts": { "dev": "cross-env QENV=development quasar dev", "build": "quasar build", "start": "node server.js", "lint": "eslint --ext .js,.vue src", "test": "echo \"See package.json => scripts for available tests.\" && exit 0", "test:unit": "jest --updateSnapshot", "test:unit:coverage": "jest --coverage", "test:unit:watch": "jest --watch", "test:unit:watchAll": "jest --watchAll", "serve:test:coverage": "quasar serve test/jest/coverage/lcov-report/ --port 8788", "concurrently:dev:jest": "concurrently \"quasar dev\" \"jest --watch\"" },
Any ideas?
-
@GlutenBoy said in Error when running npm run dev vs quasar dev (to use qenv):
cross-env,
When did you see these warnings appear for the first time? Probably because you installed 2 packages that have incompatible dependencies. Try to remove one of them and see if the warnings go away.
btw:
- those are warnings not errors .
- https://github.com/kentcdodds/cross-env is now in maintenance mode mode, it will break eventually. I would not invest any time in it.
-
@dobbel Sorry yes these are warning not errors.
And yes I already did the test without these packages and still get these warnings when running npm run dev vs quasar dev. So I already ruled out these packages as the cause.
-
then you should keep removing…until the warning dissapears
-
ok but why don’t I see these warning when running quasar dev ?
-
I could guess: cross-env is injecting dependencies that are not compatible with quasar. Only way to know for sure is to create a new default quasar app with quasar cli and only add cross-env.
-
it’s not cross-env since I removed qenv and cross-env, put I will create a new app an insert all our extensions until I find the culprit. Although I’m not what will I do at this point… since we probably need that extension.
-
@GlutenBoy At this point, I’d scrub
npm
and useyarn
. We keep telling people this. The reason is that npm has issues hoisting dependencies that bork the node_modules. And, yarn does a better job at it, but we have also seen issues (just not in the same quantity).Try to use
yarn
and report back to me as I would really like to know if that resolves your issue. -
Hey @Hawkeye64 ,
Actually I just did that, it didn’t resolve the problem, but after googling this even more, I found that on windows you get that error in the Powershell terminal but not in the good old cmd.exe terminal… so cmd.exe it is for now.
Thx
-
@Hawkeye64 after more investigating, and cleaning everything up with yarn and using yarn in cmd.exe I now still getting the warning…
The weird thing is that we never see these warning when running quasar dev.
The only reason to use yarn run (or npm run) was to use qenv. Maybe I’ll skip that and build our own solution, and keep using ‘quasar dev’
Maybe there’s a better way to debug these warning, but I didn’t found any solutions yet.
-
@GlutenBoy Hate to be poignant about it, but set up a VirtualBox with ubuntu. Put your sources over there and see if it works. I have a feeling it will. I used to be 100% windows guy (even worked for Microsoft twice, in the day), but because of issues for web dev, I have switch to 100% linux for the past few years.
-
@Hawkeye64 Yeah you’re right, I actually do have linux running on my workstation (dual boot), but I’m going to run a build on one of our pipeline in DevOps on ubuntu with the npm and see if I get the warnings.
Mind you even though we get warnings, all seems to be working properly. It’s just bugging me and I don’t want this to come back to haunt us.
Thx for your help!
-
I have seen this error, and the weirdest thing was that I had suddenly in my code an import node: which I am 100% certain I did not put in, almost like a plugin in Visual Studio Code was adding this without my knowledge. I removed this line and the latest plugins and now all is OK again. But watch out for ‘stinky’ plugins !!