Closed nspyke closed 2 years ago
What's your package.json?
{
"version": "2.0.0",
"licence": "UNLICENSED",
"private": true,
"repository": {},
"devDependencies": {
"@api-platform/client-generator": "^0.7.3",
"@openapitools/openapi-generator-cli": "^2.2.2",
"@symfony/stimulus-bridge": "^2.1.0",
"@symfony/stimulus-bridge-types": "^1.0.0",
"@symfony/webpack-encore": "^1.5.0",
"@types/bootstrap": "3.4.0",
"@types/datatables.net": "^1.10.19",
"@types/jquery": "^3.5.0",
"@types/jquery.validation": "^1.16.6",
"@types/lodash": "^4.14.168",
"@types/sortablejs": "^1.10.6",
"@typescript-eslint/eslint-plugin": "^4.11.1",
"@typescript-eslint/parser": "^4.11.1",
"@vue/compiler-sfc": "^3.2.11",
"autoprefixer": "^10.2.6",
"core-js": "^3.15.1",
"inky-cli": "^1.0.1",
"moment-locales-webpack-plugin": "^1.2.0",
"node-sass": "^7.0.1",
"node-sass-tilde-importer": "^1.0.2",
"postcss": "^8.2.2",
"postcss-loader": "^4.0.0",
"regenerator-runtime": "^0.13.2",
"sass-loader": "^12.4.0",
"standard": "^16.0.4",
"stylelint": "^13.11.0",
"stylelint-config-sass-guidelines": "^7.0.0",
"ts-standard": "^11.0.0",
"ts-loader": "^8.1.0",
"typescript": "~4.2.4",
"vue-loader": "^16.5.0",
"vue-template-compiler": "^2.6.12",
"webpack-notifier": "^1.6.0"
},
"dependencies": {
"@stripe/stripe-js": "^1.15.1",
"admin-lte": "^2.3.11",
"autosize": "^4.0.2",
"axios": "^0.21.1",
"basiclightbox": "^5.0.4",
"bootstrap": "^3.4.1",
"bootstrap-datepicker": "^1.6.4",
"bootstrap-sass": "^3.4.1",
"change-case": "^4.1.2",
"chart.js": "^2.9.4",
"filepond": "^4.29.1",
"filepond-plugin-file-validate-type": "^1.2.6",
"filepond-plugin-image-preview": "^4.6.10",
"foundation-emails": "^2.2.1",
"jquery": "^3.2.1",
"jquery-validation": "^1.19.3",
"lodash": "^4.17.0",
"moment": "^2.18.1",
"select2": "^4.0.13",
"sortablejs": "^1.13.0",
"stimulus": "^2.0.0",
"stringify-object": "^3.3.0",
"sweetalert": "^2.1.2",
"symfony-ts-router": "^1.0.6",
"vue": "^3.2.11",
"vue-filepond": "^7.0.0"
},
"scripts": {
"lint-js": "standard --verbose",
"lint-ts": "ts-standard --verbose",
"lint-scss": "stylelint assets/**/*.scss",
"fix-scss": "stylelint --fix assets/**/*.scss",
"fix-js": "standard --fix",
"fix-ts": "ts-standard --fix",
"dev": "encore dev-server",
"dev:build": "encore dev",
"watch": "encore dev --watch",
"build": "encore production",
"build:progress": "encore production --progress",
"email-css": "node-sass --importer=node_modules/node-sass-tilde-importer assets/modules/email/index.scss assets/css/email.css",
"generate:openapi": "openapi-generator-cli generate -g typescript-axios -c assets/openapi-codegen.yaml -o assets/modules/api/openapi -i assets/modules/api/openapi.schema.json --skip-validate-spec --api-package apis --model-package models --model-name-suffix Interface",
"generate:graphql": "graphql-codegen -c assets/graphql-codegen.yaml",
"generate:interfaces": "generate-api-platform-client -g typescript http://localhost:8000/api assets/modules/api"
},
"browserslist": [
"defaults",
"ie 11"
],
"standard": {
"env": {
"jquery": true,
"browser": true,
"amd": true
},
"ignore": [
"public",
"**/*.ts"
]
},
"ts-standard": {
"env": {
"browser": true,
"amd": true
},
"ignore": [
"**/*.js",
"public",
"assets/shims*.ts"
]
},
"stylelint": {
"extends": "stylelint-config-sass-guidelines",
"rules": {
"selector-max-id": 1,
"selector-max-compound-selectors": null,
"max-nesting-depth": 4,
"selector-no-qualifying-type": null
}
},
"engines": {
"yarn": "YARN NO LONGER USED - use npm instead. e.g. Instead of 'yarn dev', use 'npm run dev'"
}
}
In your lockfile, can you try to update webpack-cli
and @webpack-cli/serve
dependencies?
Yea, that fixed it. However, as I haven't specified it as a root dependency, I would have expected Encore to have specified that the newer version was required and NPM would have updated it accordingly.
The package.json of this project currently specifies "webpack-cli": "^4"
I was on webpack-cli version 4.5, and the upgrade took me to 4.9.1 And, serve was version 1.3.0 and now upgraded to 1.6.0
I'm not sure what the exact versions that this bug was caused by, but we should tighten the versioning requirements I think to fix this bug
I'm ok with tightening the version requirements. Ideally, we could find out WHAT version minimums we need of each. But I also saw someone just hit this problem.
@weaverryan as this is a dependency and not a peer dependency (or our weird behavior where we rely on devDependency ranges to define optional peer dependency ranges), we don't actually care. yarn and npm will always install the latest version of the dependency, as the npm ecosystem does not try to find a set of dependencies matching all input constraints (as packages are not forced to be installed only once).
So I would go for ^4.9.1
In your lockfile, can you try to update
webpack-cli
and@webpack-cli/serve
dependencies?
how to do this? because I have just started with TypeScript and getting the same error in another project, can you please help?
After upgrading from v1.5 to v1.7 I get the following error when running
encore dev-server
My webpack.config.js file is
Both dev and prod builds work fine.