Coder Social home page Coder Social logo

trellixvulnteam / natours_h26e Goto Github PK

View Code? Open in Web Editor NEW

This project forked from prathameshbelurkar/natours

0.0 0.0 0.0 30.09 MB

Natours is a bond between Nature and Tours. This is a sample website using SaSS, Animations.

Home Page: https://prathameshbelurkar.github.io/Natours/

CSS 58.61% HTML 17.17% SCSS 24.22%

natours_h26e's Introduction

Note: This is not my own Design

Possible fixes for common problems with NPM packages

Q1: My Sass isn't compiling at all or the -w flag is not working

Solution 1

This may be because you're using a different node-sass version than the one I use in the videos. Please uninstall node-sass with:

npm uninstall node-sass --save-dev

Then install version 4.5.3 with;

npm install [email protected] --save-dev.

Solution 2

This is more of a workaround if Solution 1 doesn't work. You can install a package called nodemon to run node.js code directly. Install it with:

npm install nodemon --save-dev

Then in the package.json file, add the following tasks:

"compile:sass": "node-sass sass/main.scss css/style.comp.css"
"watch:sass": "nodemon -e scss -x \"npm run compile:sass\""

Solution 3

If you're using VSCode, the defualt autosave setting is that it saves your file each time you stroke a key. This made me run into some errors in the videos. The fix is to change the autosave setting to onFocusChange. You can do so by copying the following instruction to the settings (panel on the right side):

"files.autoSave": "onFocusChange"

Q2: Autoprefixer isn't working on Windows

On Windows you will have to escape the " in the autoprefixer task, just like this:

"prefix:css": "postcss --use autoprefixer -b \"last 10 versions\" css/style.concat.css -o css/style.prefix.css"

Q3: General problems

If your NPM packages don't work at all, please make sure you have at least node v6.x.x installed on your computer. You can check your version with node -v.

You can also try setting all your NPM packages to the same versions used in the videos. It works like described in Q1 of this document (node-sass example). These are the versions I used in the videos:

"autoprefixer": "^7.1.4",
"concat": "^1.0.3",
"node-sass": "^4.5.3",
"npm-run-all": "^4.1.1",
"postcss-cli": "^4.1.1"

I will keep this document updated if more issues arise.

natours_h26e's People

Contributors

prathameshbelurkar avatar trellixvulnteam avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.