-
-
Notifications
You must be signed in to change notification settings - Fork 529
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Modernize manager template build workflow #15793
Conversation
I'm getting the following error when running
|
Joshua - may be a silly question, but did you run npm update before trying to build? If not, you'll need to do that to install the new dev dependencies. |
I am unable to get past step 1 of the "How to test" instructions…
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not working as described.
Sorry about that, guys. Let me update the package.json to get the correct grunt locally. I had no problems, but must have been running against my globally installed grunt module. Be back... |
After researching a bit I suspect you may be running a version of npm between v3 and v6, which do not automatically resolve peer dependencies. If so, upgrading to the current stable version (7.x) will hopefully clear up the issue (npm install -g npm@latest). |
That might be the case, I'll try it again soon! |
Upgrading npm to 7.x solved my issue. I was running 6.x. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems to work for me.
Updates to dev packages and the grunt config primarily to support ES6 javascript and replace the deprecated node sass implementation with dart sass.
Provides a more streamlined config for autoprefixing and minification via postCSS module and its plugins and removes issues with grunt-autoprefixer dependency vulnerabilities
0612ce1
to
fbcd42e
Compare
"grunt-terser": "^2.0.0", | ||
"node": "^14.15.0", | ||
"normalize-scss": "^7.0.1", | ||
"postcss": "^8.3.6" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why you use postcss and sass both?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
postcss is being used as a base for cssnano and autoprefixer. I'm not using the postcss scss plugin to parse scss because it's not entirely standard sass.
"grunt-dart-sass": "^2.0.1", | ||
"grunt-notify": "^0.4.5", | ||
"grunt-terser": "^2.0.0", | ||
"node": "^14.15.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
windows 7 is not supported by node.js 14 :( Windows 7 still be more popular than 8, at least in Russia.
Is this dependency is necessary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Windows 7, as you probably know, has been unsupported by Microsoft for more that a year and a half now. That said, I've seen that people on 7 have been able to get node 14+ running. See nodejs/node#33000 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for link, I'll try it.
Anyway, I would ask again: for what purpose is this dependency?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's the base software needed to use npm and the modules it manages. Are you intending on doing some development on the manager interface? Note that this same dependency has existed in 2.x for quite a while now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's very strange to have the npm installed and not have the nodejs installed, isn't it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mishantrop yes it is. I assume you're running Windows 7?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, including. Also I use Fedora and Mac OS. Dependings on tasks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also there are better ways to limit the version of the application (anyway, I dont see any reasons for it in MODX):
package.json
{
"name": "modx",
"version": "3.0.0",
"engines": {
"node": ">=12.0.0"
}
}
.npmrc
engine-strict=true
I have not personally tested it as it was never necessary.
What does it do?
Why is it needed?
Two reasons:
How to test
Note that a warning will appear when compiling the SASS files, as fontawesome and normalize-scss use the to-be deprecated "/" for division. This will be replaced my the math.div([numerator], [denominator]) method and be required for Dart Sass 2.0+ (which is a ways off, as its current version is 1.37.5). This issue is on the radar for both repos.
Related issue(s)/PR(s)
None