I'm trying to publish a Blazor WASM in an Azure Static Web App with a GitHub Action.
This application uses a custom Bootstrap stylesheet, generated by grunt-contrib-sass npm module.
Grunt Contrib Sass requires Ruby and Sass to build my stylesheet. It works on my computer. But not in a GitHub Action. I've this error:
Running "sass:dist" (sass) task
Verifying property sass.dist exists in config...OK
Files: wwwroot/scss/galerie-renovation.scss -> wwwroot/css/galerie-renovation.css
Options: (none)
Warning:
You need to have Ruby and Sass installed and in your PATH for this task to work.
More info: https://github.com/gruntjs/grunt-contrib-sass
Use --force to continue.
Aborted due to warnings.
I've tried to setup ruby 2.7 with a dedicated job, a step in my build_and_deploy_job and with a npm package.
It's a public repository; You can view the project (code, Actions and logs) in my GitHub repository: https://github.com/andrestalavera/galerie-renovation
For the moment, the workaround that I've found consist to don't ignore generated files in my .gitignore file.
But I want to generate in my GitHub Action... Is it possible at least?
I've seen these resources:
Grunt not executing sass command : Not in GitHub Actions
Related
I have an app initiated using Create React App, so npm run build runs react-scripts build. I recently installed prettier and so added a .eslintrc.json file to the project root to load the prettier plugin. npm run build works as expected locally, but, when deploying the app to Heroku, npm run build tries to run ESLint and fails because the plugins are devDependencies rather than dependencies.
Failed to load plugin 'prettier' declared in '.eslintrc.json': Cannot find module 'eslint-plugin-prettier'
From prior wrangling with a similar issue, I know that I can set NPM_CONFIG_PRODUCTION=false in Heroku so that it will install devDependencies, which actually does resolve the deployment issue. Nevertheless, I'm curious to learn if there's another solution that doesn't require setting NPM_CONFIG_PRODUCTION=false.
Is it possible to prevent npm run build in this scenario from running ESLint altogether or to prevent it from trying to access the plugins specified in .eslintrc.json? I acknowledge that adding .eslintrc.json to .gitignore is one solution, but I want the ESLint configuration in my repo.
you can run "npm run eject" to generate webpack configuration files, and then modify "webpack.config.js",delete the eslint configuration
I currently need to use the nativescript-https plugin but its repository is not updated and not packed to npm and it has a couple bugs (including one with AFNetworking with version) without a solution so I've forked the repository and try to add from this forked repo using:
tns pluging add [url of the repo]
this install the plugin with no errors, but when I try to run the app it shows the following error:
NativeScript encountered a fatal error: Error: Could not find module 'nativescript-https'
So I would like to know... which is the correct workflow to do this?
Compile and add the plugin folder to your package.json using relative path.
"myplugin": "file:myplugin/dist"
Assuming myplugin is your plugin folder placed at your project root, dist is where you have your compiled JS files.
The error wasn't related to the plugin installation, the problem was that I needed to run Typescript compiler on plugin's folder to generate the .js files.
My friend initialized a GitHub repo after initializing React Native in a certain directory. After I pull his files into a directory and initialize a local repository on my computer and run the XCode project, there seem to be a lot of missing files and the build fails. There's probably something I need to do which is taken care of when setting up react native in the "react-native init AwesomeProject" step, but I'm not trying to set up a new project. Instead, I want to keep the files he's already developed, but set up the React Native "environment"..how would I go about doing this?
You need to install the dependencies through npm. Just enter the following command in the root directory of your project:
npm i
I'm unable to access my sass files when running grunt server. Not sure if this is just a file path/permission error or something greater.
Running sudo grunt server gives the same output
grunt server
Running "server" task
Running "clean:dist" (clean) task
Running "copy:video_fonts" (copy) task
Copied 4 files
Running "copy:video_js" (copy) task
Copied 1 files
Running "concurrent:dist" (concurrent) task
Warning: Error: Error generating source map: couldn't determine public URL for the source stylesheet.
No filename is available so there's nothing for the source map to link to.
on line of standard input
Use --trace for backtrace. Use --force to continue.
Aborted due to warnings.
%
I get the following error in my browser when I run grunt server --force
Sass::SyntaxError: Error generating source map: couldn't determine public URL for the source stylesheet.
No filename is available so there's nothing for the source map to link to.
I had the same problem on a grunt task that was perfectly working a couple of days ago. I suppose the problem was in some misalignment between the modules for that project (specifically grunt-contrib-sass) and the version of SASS installed.
I solved the problem by upgrading SASS, removing the node_modules folder inside my project and re-installing them.
I am sorry I cannot provide you any reason why it worked, but it did.
Update:
$ rm -R node_modules
$ npm install
Try:
$ grunt --debug --verbose sass
To get more info about what's happening while grunt runs.
S.
I am just trying to make a local development environment that isn't on my work computer, and I keep getting an error:
Warning: Errno::ENOENT on line 441 of /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/pathname.rb: No such file or directory - /Users/johnpett/Desktop/Node/app/bower_components
Run with --trace to see the full backtrace Use --force to continue.
I have installed all the Ruby parts and Yeoman to build the app scaffold, but I can't seem to run the 'grunt server' command without throwing up this error.
The error is quite clear, a grunt-plugin require that file...
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/pathname.rb
Anyway ruby components are needed usually if you plan to use compass, if not, you can comment the "compass" sub-task in the "server" task in Gruntfile.js
Your folder was surely not called bower_components at that time. I guess you used yeoman.
In your compass task config you should have modified bower_components.