Closed gcampedelli closed 7 years ago
Ouh... Few questions:
sass-blank-theme
?Advices:
/var/www/magento2/vendor/snowdog/frontools
, that's why Frontools can't handle processing of your styles.node_modules
directory. If you have any troubles, just remove this directory and run npm install
again. If problem will still exist, check system requirements i.e. node.js version (you need versions>=6.9.1
but not 7.x
)Thank you for your answer Igloczek. It is always time to learn from my mistakes.
Questions 1 and 2 :Fresh Magento install on Ubuntu 16.04 at /var/www/html (I’ve corrected this by reinstalling Magento). I used composer (Answer for question 3 at end)
I installed MySql, Apache2, all requirements and went to magento setup page and installed. Then I did as follow
Install Node.js - curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.0/install.sh | bash
$nvm install 6.9.1
$nvm use 6.9.1
$nvm alias default 6.9.1
$npm install -g gulp-cli
Switched to my Magento2 dir
cd /var/www/html/Magento2
composer require snowdog/theme-blank-sass
Got an error
“Problem 1
- Installation request for snowdog/theme-blank-sass ^0.9.2 -> satisfiable by snowdog/theme-blank-sass[0.9.2].
- snowdog/theme-blank-sass 0.9.2 requires magento/framework 100.1.* -> no matching package found.
Potential causes:
- A typo in the package name
- The package is not available in a stable-enough version according to your minimum-stability setting
see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.
Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.”
Proceed to Manual Install
Downloaded Theme from Github repository v.0.9.0
Upload to /app/design/frontend/snowdog/theme-blank-sass
unzip
Changed dir again to /magento2/vendor/snowdog/frontools npm install error killed
Then manual install of tree in composer.json
run command gulp setup
Removed .sample from Themes.json in config dir
run command gulp styles --theme blank
[01:47:21] Working directory changed to /var/www/html/magento2/vendor/snowdog/frontools
[01:47:21] Using gulpfile /var/www/html/magento2/vendor/snowdog/frontools/gulpfile.js
[01:47:21] Starting 'styles'...
[01:47:21] Starting 'inheritance'...
[01:47:21] Finished 'inheritance' after 9.16 ms
[01:47:22] Finished 'styles' after 810 ms
cd to bin and run php magento setup:static-content:deploy -f
Got error:
[UnexpectedValueException]
Could not parse theme static file '/var/www/html/magento2/app/design/fronte
nd/snowdog/theme-blank-sass/__test__/web/css/styles.css'
Now I get 500 error in http
Then I configure everything again and I've tried the follow in magento2/bin
php magento dev:source-theme:deploy --type="sass" --locale="en_US" --area="frontend" --theme="snowdog/theme-blank-sass" __test__/web/ css/styles
But I get this message
[InvalidArgumentException]
Verify entered values of the argument and options. Unable to resolve the source file for 'frontend/snowdog/theme-blank-sass/en_US/__test__/web.sass'
Anyway, it is missing the symlink in /var/www/html/magento2/pub/static/frontend/Snowdog/blank/en_US
And I have no idea how to properly create it. But from the error messages I get, I suppose that's the problem I'm facing. I also changed permissions to 777 and so on.
Any ideas??
Answer to question 3: Well, I'm a journalist and by this time, I'm a coffee producer. I mainly work with branding and I have some experience with Magento 1. I'm trying to learn all this thing of Magento 2 development to setup my coffee store with my look and feel as I have lots of experience as designer. So, I'm trying to become a developer. I make lots of mistakes, but I think they are an opportunity to learn. But why work with this tools? Well, I think it is a very good idea to have SASS on Magento and why should I waste your nice work on that? We all face problems during development, it is nice if we can share and make things better from there. If you can help with this issue I would be very happy.
Thank you again for your answer, Gabriela
Looks like you are trying to use not stable version of Magento 2 and this lead you to weird solutions.
Try to install M2.1.3 via composer, then add theme and frontools via composer too and it will just start working.
When you are using composer all of necessary code sits inside vendor/{vendor_name}/{package_name}
instead of app/...
and I'd recommend to stick with this version, but it require to create a new repository for every added module i.e. modified theme.
Working with M2 is a bit more complicated than M1, so I'd advice to read docs one more time or try to find some "how to basics", b/c I'm not able to support you with everything.
Hello Igloczek.
I was able to manage by myself a Magento install 2.1.3, composer install your modules, verify that everything is ok. Ir worked so far except for the fact that Yarn is much faster and better when we have to npm install in frontools module. So far so good. But when I gulp styles in frontools, I'm still getting error messages despite the fact everything is properly installed. So the error message I get is this one
Error in plugin 'run-sequence(inheritance)'
Message:
ENOENT: no such file or directory, symlink '/var/www/html/magento2/vendor/snowdog/theme-blank-sass/Magento_AdvancedCheckout/styles/_module.scss' -> '/var/www/html/magento2/var/view_preprocessed/frontools/frontend/Snowdog/blank/Magento_AdvancedCheckout/styles/_module.scss'
Details:
errno: -2
code: ENOENT
syscall: symlink
path: /var/www/html/magento2/vendor/snowdog/theme-blank-sass/Magento_AdvancedCheckout/styles/_module.scss
dest: /var/www/html/magento2/var/view_preprocessed/frontools/frontend/Snowdog/blank/Magento_AdvancedCheckout/styles/_module.scss
Stack:
Error: ENOENT: no such file or directory, symlink '/var/www/html/magento2/vendor/snowdog/theme-blank-sass/Magento_AdvancedCheckout/styles/_module.scss' -> '/var/www/html/magento2/var/view_preprocessed/frontools/frontend/Snowdog/blank/Magento_AdvancedCheckout/styles/_module.scss'
at Error (native)
at Object.fs.symlinkSync (fs.js:1054:18)
at createSymlink (/var/www/html/magento2/vendor/snowdog/frontools/helper/inheritance-resolver.js:16:18)
at plugins.globby.sync.forEach.srcPath (/var/www/html/magento2/vendor/snowdog/frontools/helper/inheritance-resolver.js:41:7)
at Array.forEach (native)
at module.exports (/var/www/html/magento2/vendor/snowdog/frontools/helper/inheritance-resolver.js:40:8)
at themes.forEach.name (/var/www/html/magento2/vendor/snowdog/frontools/task/inheritance.js:9:46)
at Array.forEach (native)
at Object.module.exports (/var/www/html/magento2/vendor/snowdog/frontools/task/inheritance.js:8:10)
at module.exports (/var/www/html/magento2/vendor/snowdog/frontools/node_modules/orchestrator/lib/runTask.js:34:7)
Did I make something wrong? Is it themes.json?
Anyway, thank you so much for your advice. I think others reading this can overcome their mistakes as well and soon I think we can close this thread as solved. But it looks like a nice work, but I still can't get blank-sass styles in place. I read you instructions, maybe there is something there I misunderstood. But for instance, reading your instructions I found out yarn is better than npm and so on. Maybe a final instruction can help everybody with same issue.
Kinda weird... Did you make any changes in vendor/snowdog/theme-blank-sass
? You shouldn't.
If not, try to remove var/view_preprocessed
and run gulp styles
again.
Wow, just worked! Nice work to go on! Congratulations on that! I will try to go further and deploy my on theme using yours as base. For instance, thanks a lot for your support.
You're welcome :)
I'm not a developer, but I arrived to this point and I have no style in frontend
Is there anything I'm missing? I was expecting a similar page to default Magento Blank Theme. Can you help me on that?