I'm trying to import the stylesheet like this #import"../../../../styles/forms.scss";
But I get this error:
ERROR in Module build failed (from ./node_modules/sass-loader/dist/cjs.js):`
SassError: Can't find stylesheet to import.`
1 │ #import"../../../styles/variables.scss";
(it goes back three times instead of four like in my path)
Then when I go back once more (just to test) "../../../../../styles/forms.scss", VS Code goes back 5 times. I know the path I'm typing is right. I am using Angular if it matters.
Apparently I imported variables.scss within my forms.scss file and when I called forms.scss one level deeper, it couldn't find variables.scss with the path I specified in forms.scss.
Now I removed variables.scss from forms.scss and added them separately to each file and it works.
Related
I have a jekyll based blog. When I try to build it I get this error:
...
Generating...
Jekyll Feed: Generating feed for posts
Warning on line 1, column 1 of /home/john/Projects/blackblog/assets/css/index.sass:
This selector doesn't have any properties and won't be rendered.
╷
1 │ ---
│ ^^^
╵
Warning on line 2, column 1 of /home/john/Projects/blackblog/assets/css/index.sass:
This selector doesn't have any properties and won't be rendered.
╷
2 │ ---
│ ^^^
╵
Error: This file is already being loaded.
┌──> /home/john/Projects/blackblog/assets/css/index.sass
4 │ #import index, font, basic, layout
│ ^^^^^ new load
╵
┌──> /home/john/Projects/blackblog/assets/css/classes.sass
1 │ #import index, highlight
│ ━━━━━ original load
╵
/home/john/Projects/blackblog/assets/css/index.sass 4:9 #import
/home/john/Projects/blackblog/assets/css/classes.sass 1:9 root stylesheet
Conversion error: Jekyll::Converters::Sass encountered an error while converting 'assets/css/classes.sass':
This file is already being loaded.
...
This code of whole site: github.com/yagarea/blackblog.
What should I fix to make my site build ?
Thank you for help
Cause of this issue was that I had file name index.sass in _sass and in assets. This was not issue in until jekyll-sass-converter version 3.0.
I renamed one file to main.sass. I brought a lot of other issues but it was easy fix because build log tells you what to do to fix it.
Not really a bug. This is how it happened:
index.sass has front matter. Jekyll read file as string, process and remove the front matter, then start to compile an input “string”.
index.sass imports index.sass, according to sass spec, the relative import of itself hits before load path, and now we are importing the same file which technically is a circular import. When sass read the same input directly from disk, it knows nothing about the Jekyll front matter and would give up with a syntax error.
One way to address it can be write a custom importer that checks for front matter in each imported partials, and compile it with Jekyll before read as sass partials. However, this has significant drawbacks that isn’t worth doing:
Jekyll’s sass implementation has never allowed partials to have front matters.
Allowing front matter in partials would lead to slower compilation performance as every partial need to be preprocessed by Jekyll, and then passed through protobuf via stdio as a string rather than dart-sass-embedded directly read file from disk.
Even if we allow front matter in partials, it would still be circular import, and user would just get a different error message.
Source: github.com/jekyll/jekyll/issues/9265
Seems CurrentProject.ImportExportSpecifications("import-CP_Commandes").Execute has sometimes a strange behaviour.
I need to import daily one or several csv files that will be inserted into an access database. Each file is previously copied in a file named CP_Commandes.csv. I have written a VBA function within Access to do the job.
I have created the necessary importexport specification (named import-CP_Commandes). The relevant xml is stored in a txt file. It works fine with the first file, i.e. the CP_commandes.csv is imported into the relevant Access table (x_temp_commandes). Problem is, after copying the next file into CP_commandes.csv, Executing the import does just nothing, without any error. It looks like Access considers it has already done the job ! Even after stopping the program and re-launching, same result : x_temp_commandes is empty !
After some time, maybe an hour or more, I cant' be more precise, the second file is treated OK ...
I tried different solutions for file #2 to cope with this problem.
Solution 1 :
CurrentProject.ImportExportSpecifications("import-CP_Commandes").delete
DoEvents
CurrentProject.ImportExportSpecifications.add "import-CP_Commandes",ch '(ch previously loaded from the relevant xml file)
DoEvents
CurrentProject.ImportExportSpecifications("import-CP_Commandes").Execute
=> no error, x_temp_commandes empty
Solution 2 :
Same as solution 1, but with ch modified to specify the actual file to be imported instead of CP_Commandes.csv => no error, x_temp_commandes empty.
But sometimes, the program without ANY modification is able to import 2 or 3 files without problem.
Hence my question : Is there something I can do to make sure the work will be done ?
Sorry I finally figured it out - I was not closing the recordset which I oped with
set rs=CurrentDb.OpenRecordset("x_Temp_CP_Commandes")
For this reason, Import did not work - but it did not mention an error. By applying an rs.close after this, the following files import correctly.
For Python there is an option to add custom CSS to a Dash app. The method seems quite straightforward, it says
Just create a folder named assets in the root of your app directory
and include your CSS and JavaScript files in that folder. Dash will
automatically serve all of the files that are included in this folder.
By default the url to request the assets will be /assets but you can
customize this with the assets_url_path argument to dash.Dash
source: https://dash.plotly.com/external-resources
However when I try to do so in Julia, nothing happens.
Is this feature a thing in Julia? If not, how can I do so?
Found a hack, have no idea if this is the correct way though...
Essentially tried to find the inputs to app = dash() by going methods(dash)
julia> methods(dash)
# 1 method for generic function "dash":
[1] dash(; external_stylesheets, external_scripts, url_base_pathname, requests_pathname_prefix, routes_pathname_prefix, assets_folder, assets_url_path, assets_ignore, serve_locally, suppress_callback_exceptions, prevent_initial_callbacks, eager_loading, meta_tags, index_string, assets_external_path, include_assets_files, show_undo_redo, compress, update_title) in Dash at C:\Users\<User>\.julia\packages\Dash\Weukk\src\app\dashapp.jl:291
where I noticed a arg assets_folder. Putting in the absolute path seems to work so the full code looks something like this
using Dash
app = dash(assets_folder="/absolute/path/to/assets")
I have been porting a project that used Make to SCons. Generally, I am pleased by how easy it is to use SCons, relatively to make. However, there is one thing that has resisted several hours of attempts.
The files in my projects are contained into a tree which starts at
ProjectHome. The srouces are in several subdirectories contained in ProjectHome/src/
I have a SConstruct file in ProjectHome which defines the build enviroment and then calls a SConscript
(in ProjectHome) which builds the object files, which are then put into a library in ProjectHome/lib
by SConstruct.
Everything works fine, except that I would like to separate where the .o files are kept from
where the source files are.
So here's what I have
#SConstruct.py
...
# The environment is defined above, no issues
cppobj, chfobj=SConscript('./SConscript.py', 'env', variant_dir='build', src_dir='.', duplicate=False)
env.Install('lib/'+str(Dim)+'D', env.SharedLibrary(target='Grade'+str(n), source=cppobj+chfobj))
and this is for the SConscript.py
#SConscript.py
import platform
import os
import sys
def getSubdirs(abs_path_dir) :
""" returns a sorted list with the subdirectoris in abs_path_dir"""
lst=[x[0] for x in os.walk(abs_path_dir)]
lst.sort()
return lst
Dirs=getSubdirs(os.getcwd()+'/src') # gives me list of the directories in src
CppNodes=[]
ChFNodes=[]
Import('env')
for directory in Dirs[2:3]:
CppNodes+=Glob(directory+'/*.cpp')
ChFNodes+=Glob(directory+'/*.ChF')
# env.Object can work on lists
ChFobj=env.SharedObject(ChFNodes)
# This builder likes to work one at a time
# this build an internal representation of _F.H headers
# so that when an #include in encountered, scons look
# at this list too, and not just what specified by the IncDirs
if len(ChFNodes)==1: # this is ridiculous but having only one ChF file causes troubles
os.system('touch dummyF.ChF')
ChFNodes.append('dummyF.ChF')
ChFHeader=[]
for file in ChFNodes:
ChFHeader+=env._H(source=file)
Cppobj=env.SharedObject(CppNodes)
Return('Cppobj ChFobj')
However, for the life of me, build is ignored completely. I have tried different combinations,
even placing SConscript.py in the build dir, cally SConscript('build/SCoscript.py', 'env',...) you name it: Scons stubbornly refuses to do anything with build. Any help is appreciated. To be clear, it works in creating the libraries. It just that it places the intermediate object files in the src dirs.
I am trying to set up a SCSS transpiler in PyCharm for Django project.
Basically, what I need is to convert /static/scss/main.scss to /static/css/main.css
Here are the configurations of SCSS File Watcher:
Program: /home/maverick/.rvm/gems/ruby-2.2.3/bin/scss
Arguments: --no-cache --update /home/maverick/Documents/DjangoProjects/timberg/static/css/$FileNameWithoutExtension$.css
Working directory: /home/maverick/Documents/DjangoProjects/timberg/static/scss
Output paths to refresh: /home/maverick/Documents/DjangoProjects/timberg/static/css/$FileNameWithoutExtension$.css
What is happening is that main.css is being generated where it should. But it contains only errors, not the expected css, like this:
/*
Error: Inconsistent indentation: 2 spaces were used for indentation, but the rest of the document was indented using 8 spaces.
on line 39 of /home/maverick/Documents/DjangoProjects/timberg/static/css/main.css
and etc.
What is wrong here? How can I fix it?
The problem was in the Arguments part.
It should be:
$FileName$:/home/maverick/Documents/DjangoProjects/timberg/static/css/$FileNameWithoutExtension$.css
not just:
/home/maverick/Documents/DjangoProjects/timberg/static/css/$FileNameWithoutExtension$.css
My mistake was leaving out $FileName$: at the beginning.