I deployed an app with netlify + gatsby default options and then I cloned that repo, so I can edit the style. The problem is that it doesn't work on my machine, the following error persists:
2 problems (0 errors, 2 warnings)
ERROR #98123 WEBPACK
Generating development JavaScript bundle failed
$black: #2b2523;
^
Invalid CSS after "...black: #2b2523;": expected 1 selector or at-rule,
was ".navbar .navbar-men"
in /Users/micazev/Documents/ecominimalismo.com/src/components/all.sass
(line 11, column 17)
File: src/components/all.sass
failed Building development bundle - 22.833s
ERROR Failed to compile with 1 errors 14:39:49
⠀
error in ./src/components/all.sass
⠀
Module build failed (from
./node_modules/mini-css-extract-plugin/dist/loader.js):
ModuleBuildError: Module build failed (from
./node_modules/sass-loader/dist/cjs.js):
$black: #2b2523;
^
Invalid CSS after "...black: #2b2523;": expected 1 selector or at-rule,
was ".navbar .navbar-men"
in /Users/micazev/Documents/ecominimalismo.com/src/components/all.sass
(line 11, column 17)
at /Users/micazev/Documents/ecominimalismo.com/node_modules/webpack/lib/Norm
alModule.js:316:20
at /Users/micazev/Documents/ecominimalismo.com/node_modules/loader-runner/li
b/LoaderRunner.js:367:11
at /Users/micazev/Documents/ecominimalismo.com/node_modules/loader-runner/li
b/LoaderRunner.js:233:18
at context.callback (/Users/micazev/Documents/ecominimalismo.com/node_module
s/loader-runner/lib/LoaderRunner.js:111:13)
at Object.callback (/Users/micazev/Documents/ecominimalismo.com/node_modules
/sass-loader/dist/index.js:89:7)
at Object.done [as callback] (/Users/micazev/Documents/ecominimalismo.com/no
de_modules/neo-async/async.js:8069:18)
at options.error (/Users/micazev/Documents/ecominimalismo.com/node_modules/n
ode-sass/lib/index.js:294:32)
# ./src/components/Layout.js 17:0-20
# ./src/templates/blog-post.js
# ./src/cms/preview-templates/BlogPostPreview.js
# ./src/cms/cms.js
# multi ./node_modules/gatsby-plugin-netlify-cms/cms.js
./node_modules/gatsby-plugin-netlify-cms/cms-identity.js ./src/cms/cms.js
My repo is: https://github.com/micazev/ecominimalismo.com
I don't know what other info I could give. Please, help.
According to some threads about that starter, there's a bug about the Sass loaders that causes this issue. You have many solutions provided in this GitHub thread:
Add options to the gatsby-plugin-sass:
{
resolve: 'gatsby-plugin-sass',
options: {
indentedSyntax: true
}
}
This will allow the loader to understand the indented syntax of Sass.
Changing the extension from .sass to .scss, changing also all the references in the project: you'll need to add semicolons (;) and braces ({}) when needed.
Obviously, the second one is easier and safer.
Related
Need desperate help! :alert:
I have been trying to debug an app for the last 3 days and now I’m very stuck here.It works on my localhost but brakes on production. Mainly, my biggest mistake was that I’ve coded a lot on my machine besides sending it to production little by little. I’ve already moved from errors to errors but with no final success. I’ve installed webpack at one point and I think I shouldn’t but now I can’t get rid of it. When I try to
rake assets:precompile
that’s what I get:
Running via Spring preloader in process 82485
Calling DidYouMean::SPELL_CHECKERS.merge!(error_name => spell_checker)' has been deprecated. Please call DidYouMean.correct_error(error_name, spell_checker)' instead.
yarn install v1.22.19
warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
[1/5] 🔍 Validating package.json...
[2/5] 🔍 Resolving packages...
success Already up-to-date.
✨ Done in 0.27s.
Calling DidYouMean::SPELL_CHECKERS.merge!(error_name => spell_checker)' has been deprecated. Please call DidYouMean.correct_error(error_name, spell_checker)' instead.
yarn run v1.22.19
$ webpack --config ./config/webpack/webpack.config.js
assets by status 0 bytes [cached] 1 asset
Entrypoint application =
Entrypoint custom = custom.js
orphan modules 39 bytes [orphan] 1 module
./app/assets/stylesheets/application.scss 39 bytes [built] [code generated] [1 error]
WARNING in configuration
The 'mode' option has not been set, webpack will fallback to 'production' for this value.
Set 'mode' option to 'development' or 'production' to enable defaults for each environment.
You can also set it to 'none' to disable any default behavior. Learn more: https://webpack.js.org/configuration/mode/
ERROR in ./app/assets/stylesheets/application.scss (./app/assets/stylesheets/application.scss.webpack[javascript/auto]!=!./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./app/assets/stylesheets/application.scss)
Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
SassError: Can't find stylesheet to import.
╷
10 │ #import "font-awesome";
│ ^^^^^^^^^^^^^^
╵
app/assets/stylesheets/application.scss 10:9 root stylesheet
# ./app/assets/stylesheets/application.scss
ERROR in ./app/assets/stylesheets/application.scss
Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
HookWebpackError: Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
SassError: Can't find stylesheet to import.
╷
10 │ #import "font-awesome";
│ ^^^^^^^^^^^^^^
╵
app/assets/stylesheets/application.scss 10:9 root stylesheet
at tryRunOrWebpackError (/Users/ju-arrighi/code/Ju-Arrighi/utero/node_modules/webpack/lib/HookWebpackError.js:88:9)
at webpack_require_module (/Users/ju-arrighi/code/Ju-Arrighi/utero/node_modules/webpack/lib/Compilation.js:5055:12)
at webpack_require (/Users/ju-arrighi/code/Ju-Arrighi/utero/node_modules/webpack/lib/Compilation.js:5012:18)
at /Users/ju-arrighi/code/Ju-Arrighi/utero/node_modules/webpack/lib/Compilation.js:5083:20
at symbolIterator (/Users/ju-arrighi/code/Ju-Arrighi/utero/node_modules/neo-async/async.js:3485:9)
at done (/Users/ju-arrighi/code/Ju-Arrighi/utero/node_modules/neo-async/async.js:3527:9)
at Hook.eval [as callAsync] (eval at create (/Users/ju-arrighi/code/Ju-Arrighi/utero/node_modules/tapable/lib/HookCodeFactory.js:33:10), :15:1)
at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/Users/ju-arrighi/code/Ju-Arrighi/utero/node_modules/tapable/lib/Hook.js:18:14)
at /Users/ju-arrighi/code/Ju-Arrighi/utero/node_modules/webpack/lib/Compilation.js:4990:43
at symbolIterator (/Users/ju-arrighi/code/Ju-Arrighi/utero/node_modules/neo-async/async.js:3482:9)
-- inner error --
Error: Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
SassError: Can't find stylesheet to import.
╷
10 │ #import "font-awesome";
│ ^^^^^^^^^^^^^^
╵
app/assets/stylesheets/application.scss 10:9 root stylesheet
at Object. (/Users/ju-arrighi/code/Ju-Arrighi/utero/node_modules/css-loader/dist/cjs.js!/Users/ju-arrighi/code/Ju-Arrighi/utero/node_modules/sass-loader/dist/cjs.js!/Users/ju-arrighi/code/Ju-Arrighi/utero/app/assets/stylesheets/application.scss:1:7)
at /Users/ju-arrighi/code/Ju-Arrighi/utero/node_modules/webpack/lib/javascript/JavascriptModulesPlugin.js:441:11
at Hook.eval [as call] (eval at create (/Users/ju-arrighi/code/Ju-Arrighi/utero/node_modules/tapable/lib/HookCodeFactory.js:19:10), :7:1)
at Hook.CALL_DELEGATE [as _call] (/Users/ju-arrighi/code/Ju-Arrighi/utero/node_modules/tapable/lib/Hook.js:14:14)
at /Users/ju-arrighi/code/Ju-Arrighi/utero/node_modules/webpack/lib/Compilation.js:5057:39
at tryRunOrWebpackError (/Users/ju-arrighi/code/Ju-Arrighi/utero/node_modules/webpack/lib/HookWebpackError.js:83:7)
at webpack_require_module (/Users/ju-arrighi/code/Ju-Arrighi/utero/node_modules/webpack/lib/Compilation.js:5055:12)
at webpack_require (/Users/ju-arrighi/code/Ju-Arrighi/utero/node_modules/webpack/lib/Compilation.js:5012:18)
at /Users/ju-arrighi/code/Ju-Arrighi/utero/node_modules/webpack/lib/Compilation.js:5083:20
at symbolIterator (/Users/ju-arrighi/code/Ju-Arrighi/utero/node_modules/neo-async/async.js:3485:9)
Generated code for /Users/ju-arrighi/code/Ju-Arrighi/utero/node_modules/css-loader/dist/cjs.js!/Users/ju-arrighi/code/Ju-Arrighi/utero/node_modules/sass-loader/dist/cjs.js!/Users/ju-arrighi/code/Ju-Arrighi/utero/app/assets/stylesheets/application.scss
1 | throw new Error("Module build failed (from ./node_modules/sass-loader/dist/cjs.js):\nSassError: Can't find stylesheet to import.\n ╷\n10 │ #import "font-awesome";\n │ ^^^^^^^^^^^^^^\n ╵\n app/assets/stylesheets/application.scss 10:9 root stylesheet");
ERROR in application
Module not found: Error: Can't resolve './app/assets/javascripts/application.js' in '/Users/ju-arrighi/code/Ju-Arrighi/utero'
ERROR in custom
Module not found: Error: Can't resolve './app/assets/stylesheets/custom.scss' in '/Users/ju-arrighi/code/Ju-Arrighi/utero'
3 errors have detailed information that is not shown.
Use 'stats.errorDetails: true' resp. '--stats-error-details' to show it.
webpack 5.74.0 compiled with 4 errors and 1 warning in 4098 ms
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
rake aborted!
jsbundling-rails: Command build failed, ensure yarn is installed and yarn build runs without errors
internal:/Users/ju-arrighi/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb:85:in require' <internal:/Users/ju-arrighi/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in require'
-e:1:in `'
Tasks: TOP => assets:precompile => javascript:build
(See full trace by running task with --trace)
I am not new to puppet, but I am new to using it on Windows. Trying to configure chocolatey using the puppetlabs/chocolatey module. Initial puppet run without the module worked just fine. Then I added include chocolatey to the manifest, and it downloaded and installed chocolatey. So far, so good. However, then I went to add a custom source like so:
chocolateysource { 'mysource':
ensure => present,
location => 'https://my.chocolatey.source',
priority => 10,
}
Now I get the following message when running puppet agent -t:
PS C:\Windows\system32> puppet agent -t
Error: Could not autoload puppet/provider/package/chocolatey: C:/ProgramData/PuppetLabs/puppet/cache/lib/puppet/provider/package/chocolatey.rb:280: syntax error, unexpected '.'
pin_output&.split("\n")&.each { |pin| pin...
^
C:/ProgramData/PuppetLabs/puppet/cache/lib/puppet/provider/package/chocolatey.rb:280: syntax error, unexpected '.'
... pin_output&.split("\n")&.each { |pin| pins << pin.spli...
... ^
Error: Facter: error while resolving custom facts in C:/ProgramData\PuppetLabs\puppet\cache\lib\facter\package_provider.rb: Could not autoload puppet/provider/package/chocolatey: C:/ProgramData/PuppetLabs/puppet/cache/lib/puppet/provider/package/chocolatey.rb:280: syntax error, unexpected '.'
pin_output&.split("\n")&.each { |pin| pin...
^
C:/ProgramData/PuppetLabs/puppet/cache/lib/puppet/provider/package/chocolatey.rb:280: syntax error, unexpected '.'
... pin_output&.split("\n")&.each { |pin| pins << pin.spli...
... ^
Info: Using configured environment 'production'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Info: Redefining package in Puppet::Type
Error: Could not autoload puppet/type/chocolateysource: C:/ProgramData/PuppetLabs/puppet/cache/lib/puppet/type/chocolateysource.rb:221: syntax error, unexpected '.'
parameter(:password)&.sensitive = true
^
Error: Could not retrieve catalog from remote server: Could not intern from text/pson: Could not autoload puppet/type/chocolateysource: C:/ProgramData/PuppetLabs/puppet/cache/lib/puppet/type/chocolateysource.rb:221: syntax error, unexpected '.'
parameter(:password)&.sensitive = true
^
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run
As a non-Windows user, I feel like I'm missing something to make this work, but I'm not sure what it is. I have verified that .Net framework is installed, but not sure what else to check here. Thanks in advance for any help.
Turns out the version was the issue. I had mistakenly installed puppet 4 agent, while the server is puppet 7.
I tried running the latest version of node and postgresql, but was having problem i deprecated node to 13.12.0 and sails-postgresql to 1.0.2 as mentioned in one of the blog. still the error is coming. Stack trace is as below:
sails lift
info: Starting app...
(node:10460) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency
(Use node --trace-warnings ... to show where the warning was created)
info: Initializing apianalytics hook... (requests to monitored routes will be logged!)
info: ·• Auto-migrating... (alter)
info: Hold tight, this could take a moment.
error:
error: Error: Sails is taking too long to load.
Troubleshooting tips:
-• Were you still reading/responding to an interactive prompt?
(Whoops, sorry! Please lift again and try to respond a bit more quickly.)
-• Do you have a lot of stuff in assets/? Grunt might still be running.
(Try increasing the hook timeout. Currently it is 40000.
e.g. sails lift --hookTimeout=80000)
-• Is blueprints a custom or 3rd party hook?
(If initialize() is using a callback, make sure it's being called.)
at Timeout.tooLong [as _onTimeout] (C:\Users\dearm\OneDrive\Desktop\my work\sails-logrocket\myapp\node_modules\sails\lib\app\private\loadHooks.js:191:21)
at listOnTimeout (internal/timers.js:554:17)
at processTimers (internal/timers.js:497:7)
error: Could not load Sails app.
error:
error: Tips:
error: • First, take a look at the error message above.
error: • Make sure you've installed dependencies with npm install.
error: • Check that this app was built for a compatible version of Sails.
error: • Have a question or need help? (http://sailsjs.com/support)
complete code is here https://github.com/mannawar/sails_app
Try using Node version 10 and sails-postgresql version 2.0.0
So I recently started working on a linux machine (ubuntu 16.04) and followed the installation instructions here http://jsreport.net/downloads/. When I run npm start --production I get
2016-09-13T16:51:57.134Z - info: Initializing jsreport in production mode using configuration file prod.config.json
2016-09-13T16:51:57.138Z - info: Setting process based strategy for rendering. Please visit http://jsreport.net/learn/configuration for information how to get more performance.
2016-09-13T16:51:57.146Z - info: Searching for available extensions in /home/ross/rifiniti/optimo_ui/
2016-09-13T16:51:57.152Z - info: Extensions location cache not found, crawling directories
2016-09-13T16:51:57.317Z - error: Error occured during reporter init Error: ENOENT, no such file or directory '/home/ross/rifiniti/optimo_ui/ember/tmp/tree_merger-tmp_dest_dir-2yGnPLMA.tmp/optimo-ui/config'
at Error (native)
at Object.fs.statSync (fs.js:801:18)
at /home/ross/rifiniti/optimo_ui/node_modules/jsreport/node_modules/jsreport-core/lib/util/util.js:51:21
at Array.forEach (native)
at Object.exports.walkSync (/home/ross/rifiniti/optimo_ui/node_modules/jsreport/node_modules/jsreport-core/lib/util/util.js:44:10)
at /home/ross/rifiniti/optimo_ui/node_modules/jsreport/node_modules/jsreport-core/lib/extensions/locationCache.js:50:20
From previous event:
at /home/ross/rifiniti/optimo_ui/node_modules/jsreport/node_modules/jsreport-core/lib/reporter.js:90:8
From previous event:
at Reporter.init (/home/ross/rifiniti/optimo_ui/node_modules/jsreport/node_modules/jsreport-core/lib/reporter.js:69:30)
at Reporter.reporter.init (/home/ross/rifiniti/optimo_ui/node_modules/jsreport/lib/extendInit.js:8:21)
at Object.<anonymous> (/home/ross/rifiniti/optimo_ui/server.js:1:85)
And I have no idea why. It was working fine on mac but now it is looking for this non-existent tmp file in ember. I'm at a loss, any help would be greatly appreciated!
SOLVED!
All I had to do was remove the tmp directory in ember and it worked.
I have some problem while installing a documentation for Material Design Lite locally. I have following a command in this file:
git clone https://github.com/google/material-design-lite
cd material-design-lite
npm install && npm install -g gulp
gulp all && gulp serve
When run gulp all there is an error:
root#c54a089ac69c:/home/material-design-lite# gulp all
[21:18:38] Requiring external module babel-register
[21:18:42] Using gulpfile /home/material-design-lite/gulpfile.babel.js
[21:18:42] Starting 'clean'...
[21:18:42] Finished 'clean' after 106 ms
[21:18:42] Starting 'all'...
[21:18:42] Starting 'lint:aux'...
[21:18:45]
/home/material-design-lite/gulpfile.babel.js
136:1 warning Unexpected 'todo' comment no-warning-comments
807:3 warning Unexpected 'todo' comment no-warning-comments
✖ 2 problems (0 errors, 2 warnings)
[21:18:45] Finished 'lint:aux' after 2.39 s
[21:18:45] Starting 'styletemplates'...
[21:18:49] styles all files 1.07 MB
[21:18:49] Finished 'styletemplates' after 4.04 s
[21:18:49] Starting 'styles-grid'...
[21:18:49] Starting 'styles'...
[21:18:49] styles-grid all files 17.77 kB
[21:18:49] Finished 'styles-grid' after 187 ms
[21:18:50] styles all files 714.08 kB
[21:18:50] Finished 'styles' after 1.39 s
[21:18:50] Starting 'styles:gen'...
[21:18:52] Finished 'styles:gen' after 2.36 s
[21:18:52] Starting 'lint:sources'...
[21:18:56]
/home/material-design-lite/src/mdlComponentHandler.js
232:49 error Properties shouldn't be quoted as all quotes are redundant quote-props
366:51 error Properties shouldn't be quoted as all quotes are redundant quote-props
/home/material-design-lite/src/checkbox/checkbox.js
123:5 warning Unexpected 'todo' comment no-warning-comments
/home/material-design-lite/src/icon-toggle/icon-toggle.js
119:5 warning Unexpected 'todo' comment no-warning-comments
/home/material-design-lite/src/radio/radio.js
133:5 warning Unexpected 'todo' comment no-warning-comments
/home/material-design-lite/src/switch/switch.js
122:5 warning Unexpected 'todo' comment no-warning-comments
/home/material-design-lite/src/tabs/tabs.js
88:7 warning Do not use 'new' for side effects no-new
/home/material-design-lite/src/textfield/textfield.js
273:11 warning Unexpected 'todo' comment no-warning-comments
/home/material-design-lite/src/layout/layout.js
520:11 warning Do not use 'new' for side effects no-new
570:3 error Block must not be padded by blank lines padded-blocks
✖ 10 problems (3 errors, 7 warnings)
[21:18:56] 'lint:sources' errored after 3.59 s
[21:18:56] ESLintError in plugin 'gulp-eslint'
Message:
Failed with 3 errors
[21:18:56] 'all' errored after 14 s
[21:18:56] Error in plugin 'run-sequence'
Message:
An error occured in task 'lint:sources'.
But, when I serve it with gulp serve, it's run but just displaying this:
It's Just displaying the files! How to generate offline documentation for material-design-lite? Any ideas? Thanks.
Thank you;
PS:
I run this with on Docker with NodeJS Container.
Material Design Lite Website: https://getmdl.io
I have never try to clone the repo, but with this way i can get the offline docs. Only using wget tools.
wget -mkEpnp https://getmdl.io
And voila, you have the copies of website in your desktop.
As mentioned in the GitHub issue referenced here
You need to checkout with Unix style line endings. This process is detailed in the README.
Windows users, if you have trouble compiling due to line endings then make sure you configure git to checkout the repository with lf (unix) line endings. This can be achieved by setting core.eol.
git config core.eol lf
git config core.autocrlf input
git rm --cached -r .
git reset --hard
The other error
error Properties shouldn't be quoted as all quotes are redundant quote-props
has been fixed for the versions greater than mdl-1.1 as mentioned in the issues here
Hope it helps! Cheers !