Stencil CLI + SASS partial includes: file doesn't exist - sass

I am using stencil with #bigcommerce on the following software:
Windows 8
Node.js 7.10.0
Python 2.7.14
NPM 5.6.0
After running stencil start and then loading the site at the local URL it gives me an error like this:
[Browsersync] File event [change] : stencil/*.css
{ Error: layout\pdp.scss doesn't exist!
at options.error (C:\Users\Tyler\AppData\Roaming\npm\node_modules\#bigcommerce\stencil-cli\node_modules\#bigcommerce\node-sass\lib\index.js:277:32)
formatted: 'Error: layout\\pdp.scss doesn\'t exist!\n on line 207 of my-theme.scss\n>> #import \'layout/pdp\';\n --------^\n',
message: 'layout\\pdp.scss doesn\'t exist!',
column: 9,
line: 207,
file: 'my-theme.scss',
status: 1 }
The line in the SCSS file causing this is:
#import 'layout/pdp';
Now, on my co-worker's Mac this works. SASS looks for ./layout/_pdp.scss and it loads just fine. But on my Windows PC this doesn't work. I've tried every variation of the import by including the underscore, including the extension, using ./ at the beginning, etc. Nothing seems to work.
Does anyone know why this wouldn't work on Windows or with these versions of NPM, NodeJS, etc.?

Related

umap collectstatic gives "No such file or directory" error

As I have very little knowledge about Linux, pretty much all I can do is copy and paste things from a good tutorial and in most cases simply hope nothing goes wrong. I really tried finding a solution on my own and searching the internet but to no avail (I found a number of quite similar things but no solution I understood enough to be able to adapt it on my own to fix my problem).
I've installed an osm tile server using this amazing tutorial and it works like a charm. Now I want to install umap, using this tutorial.
Everything works fine until I get to the line "umap collectstatic". The error I get is this:
(venv) $ sudo umap collectstatic
[sudo] Passwort für umap2:
You have requested to collect static files at the destination
location as specified in your settings:
/home/ybon/.virtualenvs/umap/var/static
This will overwrite existing files!
Are you sure you want to do this?
Type 'yes' to continue, or 'no' to cancel: yes
Traceback (most recent call last):
File "/usr/local/bin/umap", line 11, in <module>
sys.exit(main())
File "/usr/local/lib/python2.7/dist-packages/umap/bin/__init__.py", line 12, in main
management.execute_from_command_line()
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 367, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 359, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 294, in run_from_argv
self.execute(*args, **cmd_options)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 345, in execute
output = self.handle(*args, **options)
File "/usr/local/lib/python2.7/dist-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 193, in handle
collected = self.collect()
File "/usr/local/lib/python2.7/dist-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 115, in collect
for path, storage in finder.list(self.ignore_patterns):
File "/usr/local/lib/python2.7/dist-packages/django/contrib/staticfiles/finders.py", line 112, in list
for path in utils.get_files(storage, ignore_patterns):
File "/usr/local/lib/python2.7/dist-packages/django/contrib/staticfiles/utils.py", line 28, in get_files
directories, files = storage.listdir(location)
File "/usr/local/lib/python2.7/dist-packages/django/core/files/storage.py", line 399, in listdir
for entry in os.listdir(path):
OSError: [Errno 2] No such file or directory: '/home/ybon/Code/js/Leaflet.Storage'
Now, I get the something might be wrong with a setting in a config file somewhere, but changing the directory in local.py
doesn't seem to do anything (like I have set it to STATIC_ROOT = '/home/xxx_myusername_xxx/umap/var/static') - I have no idea where this "/home/ybon/Code/..." path even comes from! What settings ?
I sure didn't specify THIS path anywhere! And the folder is indeed nowhere to be found on my machine. Maybe using virtualenv is somehow generating it, and I can't find it on my machine because it IS virtual (as in "not really there physically") but this is just a very wild guess and I don't really know what I'm talking about.
(I tried running the command with and without sudo and it doesn't change anything).
I have always wanted to install a tile server and have tried the tutorials you have given today. So I'm a learner like you!
Installing the Tile Server with the tutorial https://www.linuxbabe.com/linux-server/openstreetmap-tile-server-ubuntu-16-04 was really straightforward. I only used the part for Rhineland Palatinate.
With Umap (https://umap-project.readthedocs.io/en/latest/ubuntu/#tutorial) I had some problems.
1. A port was used twice. I changed the port for Apache.
2. After creating the local configuration (wget https://raw.githubusercontent.com/umap-project/umap/master/umap/settings/local.py.sample -O /etc/umap/umap.conf) this file was not immediately recognized. I helped myself by changing the file before executing the command "umap migrate".
I have made the following changes:
# For static deployment
STATIC_ROOT = '/etc/umap/var/static'
# For users' statics (geojson mainly)
MEDIA_ROOT = '/etc/umap/umap/var/data'
# Umap Settings
UMAP_SETTINGS='/etc/umap/umap.conf'
STATIC_ROOT und MEDIA_ROOT I have changed, because so the user umap has all permissions. Then I set the envirement variable UMAP_SETTINGS because otherwise the settings file /etc/umap/umap.conf is not found.
( I also have no idea where this "/home/ybon/Code/..." path comes from. After the configuration file is properly loaded, the path is loaded from the configuration file. That's why that's not important anymore. )
Now I could use the following commands without errors:
(venv) $ umap collectstatic
Loaded local config from /etc/umap/umap.conf
You have requested to collect static files at the destination
location as specified in your settings:
/etc/umap/var/static
This will overwrite existing files!
Are you sure you want to do this?
Type 'yes' to continue, or 'no' to cancel: yes
Copying '/srv/umap/venv/lib/python3.5/site-packages/umap/static/favicon.ico'
...
290 static files copied to '/etc/umap/var/static'.
(venv) $ umap storagei18n
Loaded local config from /etc/umap/umap.conf
Processing English
Found file /etc/umap/var/static/storage/src/locale/en.json
Exporting to /etc/umap/var/static/storage/src/locale/en.js
..
Processing Deutsch
Found file /etc/umap/var/static/storage/src/locale/de.json
..
Found file /etc/umap/var/static/storage/src/locale/sk_SK.json
Exporting to /etc/umap/var/static/storage/src/locale/sk_SK.js
(venv) $ umap createsuperuser
Loaded local config from /etc/umap/umap.conf
Username (leave blank to use 'umap'):
Email address:
Password:
Password (again):
Superuser created successfully.
(venv) $ umap runserver 0.0.0.0:8000
Loaded local config from /etc/umap/umap.conf
Loaded local config from /etc/umap/umap.conf
Performing system checks...
System check identified no issues (0 silenced).
April 09, 2018 - 14:02:15
Django version 1.10.5, using settings 'umap.settings'
Starting development server at http://0.0.0.0:8000/
And finally I was able to use umap.

Foundation SCSS Error: Incompatible units: 'em' and 'rem'

I am having this issue when i try to compile my sass for foundation.
My foundation.scss file look like th following:
// Settings
#import "global/settings"; // Foundation settings file.
// Foundation mixins & browser resets
#import '../../node_modules/foundation/scss/foundation';
I have uninstalled and reinstalled foundation with the same result.
I also updated everything.
Full error:
[22:36:59] gulp-notify: [Sass Error] node_modules\foundation \scss\foundation\components\_forms.scss
Error: Incompatible units: 'em' and 'rem'.
on line 51 of node_modules/foundation/scss/foundation/components /_forms.scss
>> $input-error-message-top: -($form-spacing) - emCalc(5px) !default;
-------------------------------------^
Literally any help on this would be fantastic.
Turns out i had a variable set to use rem and it should have been em in my settings.scss file and this was the culprit.

Error opening a file with h5fopen_f in FORTRAN / MPI / HDF5 ( 1.10.1 )

I am using a Fortran code that uses HDF5 (1.10.1). At some point there is a call to open a file using h5fopen_f:
H5FileName = "+hdf5/Temperature_00000_00001.h5"
CALL h5fopen_f(H5FileName, H5F_ACC_RDWR_F, file, hdferr)
Scalardataset = 'Temperature_00001_0000'
call h5ltget_dataset_info_f(file, Scalardataset, dimstmp, type_class, type_size, hdferr)
call h5fclose_f(file,hdferr)
which is giving me an error:
HDF5-DIAG: Error detected in HDF5 (1.10.1) MPI-process 0:
#000: H5F.c line 586 in H5Fopen(): unable to open file
major: File accessibilty
minor: Unable to open file
#001: H5Fint.c line 1305 in H5F_open(): unable to lock the file
major: File accessibilty
minor: Unable to open file
#002: H5FD.c line 1839 in H5FD_lock(): driver lock request failed
major: Virtual File Layer
minor: Can't update object
#003: H5FDsec2.c line 940 in H5FD_sec2_lock(): unable to lock file, errno = 11, error message = 'Resource temporarily unavailable'
major: File accessibilty
minor: Bad file ID accessed
I have checked that the file exists, it's where it should and that I have the right permissions. Also, the code works fine when I just use one process, and when I use more than one, one of the processes is able to open the file ( err=0 ), but the rest can't ( err=-1 ). Finally, I have this same code installed somewhere else and it works just fine (with version 1.8.14).
Can this be a problem with the version?
I found two ways of fixing this:
Opening the files as read only, using H5F_ACC_RDONLY_F instead of H5F_ACC_RDWR_F (this is fine for me because I don't need to write.
Recompiling everything using HDF5 1.8.14. I guess that read and write permissions are more restrictive in version 1.10.x than in version 1.8.x.
Ideally I would like to be able to use a more up to date version of HDF5 together with H5F_ACC_RDWR_F, but for now it works for me.
I had a very similar issue with HDF5 1.10.1. We are using multiple readers to access a file in H5F_ACC_RDONLY mode.
Disabling file locking by setting the environment variable seems to resolve the H5FDsec2.c line 940 in H5FD_sec2_lock(): unable to lock file, errno = 11, error message = 'Resource temporarily unavailable':
export HDF5_USE_FILE_LOCKING="FALSE"
This env var is checked at runtime by hdf5. See: https://support.hdfgroup.org/ftp/HDF5/current/src/unpacked/release_docs/RELEASE.txt​

Rebar3 : not able to install on windows 8

I am trying to install rebar3 using the git console.I have erlang installed and the path is set to C:\Program Files\erl7.3\bin
Here are the steps which I followed :
$ git clone https://github.com/erlang/rebar3.git
$ cd rebar3
$./bootstrap
On hitting bootstrap ,I get the following error
escript: exception throw: {error,{rebar_prv_update,package_index_write}}
in function rebar_prv_update:do/1 (src/rebar_prv_update.erl, line 77)
in call from rebar_core:do/2 (src/rebar_core.erl, line 125)
in call from erl_eval:do_apply/6 (erl_eval.erl, line 670)
in call from escript:eval_exprs/5 (escript.erl, line 871)
in call from erl_eval:local_func/6 (erl_eval.erl, line 557)
in call from escript:interpret/4 (escript.erl, line 787)
in call from escript:start/1 (escript.erl, line 277)
in call from init:start_it/1 (init.erl, line 1055)
Any suggestions on how to solve this?
Please take a look at the following github issue.
My user home directory was pointed to a network location. I removed the network location from My Computer and was able to build rebar3 successfully.

Error: Individual stylesheets must be in the sass directory

My CSS doesn't work. Here is my terminal log:
$ gulp sass
Using gulpfile ~/dev/myproject/gulpfile.js
Starting 'sass-ionic'...
Starting 'sass-myproject'...
Individual stylesheets must be in the sass directory.
{ [Error: Compass failed]
message: 'Compass failed',
fileName: '/Users/me/dev/myproject/scss/main.scss',
showStack: false,
showProperties: true,
plugin: 'gulp-compass',
__safety: { toString: [Function] } }
Finished 'sass-ionic' after 634 ms
I am using Ionic Framework.
The funny part is that I have two computers with pretty much same setup and the other works fine and the other gives the error above. I'm using git so the both projects have identical files and folder structure.
EDIT: After downgrading compass:
Here is what I get after 'gulp sass':
Starting 'sass-ionic'...
Starting 'sass-murikka'...
Finished 'sass-ionic' after 614 ms
warning Webkit only supports pixels for the start and end stops for radial gradients. Got: 100%
warning Webkit only supports pixels for the start and end stops for radial gradients. Got: 100%
identical ./www/css/main.css
Finished 'sass-murikka' after 843 ms
Starting 'sass'...
Finished 'sass' after 13 μs
On the other computer I get exactly the same output except
identical ./www/css/main.css
-->
overwrite ./www/css/main.css
For anybody stumbling across this bug on a Windows environment, first check your config paths to ensure they're not absolute or some other nonsense.
Next, make sure you use the correct case with your directories when navigating to your project directory. Since Windows is case-insensitive, it will allow you to cd myproject/source/ when it's actually MyProject/source/. gulp-compass will give this error if you run your gulp task using just cd myproject/source/ lower case.
Check your terminal CWD and make sure it matches the case: $ MyProject/source/ > gulp sass or some such.
Check if Ruby is installed in your computer. I had the same error and installing ruby solved the problem

Resources