Upstatement / boston-built

A repository for the born-again bostonbuilt.org (Puppy)
1 stars 0 forks source link

How to use/install on Windows? #9

Open televators opened 7 years ago

televators commented 7 years ago

I'm trying to follow along with the Timber videos on Youtube and I can't get this to run or work. I'm not really sure how I'm supposed to use this since I'm not super familiar with running anything with twig. Should I make a vhost in WAMP and drop this in there and then run 'npm install' and 'gulp'? I just have it in my download folder at the moment. When running the install script it is just filling my cmder window with errors and warnings. I don't have Bower installed and it was giving me errors with that so I don't know if I'm supposed to have it or if it should be contained within the project directory. Can you elaborate on the requirements and install procedure? Thanks! Here's the npm-debug.log: npm-debug.txt

Here's the output in my terminal: `C:\wamp64\www\boston {git}{hg} {lamb} npm install npm WARN deprecated win-spawn@2.0.0: use cross-spawn or cross-sp awn-async instead. npm WARN deprecated minimatch@0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue npm WARN deprecated minimatch@0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue npm WARN prefer global marked@0.3.5 should be installed with -g

customizr@1.0.0-alpha postinstall C:\wamp64\www\boston\node_modules\customizr node scripts/postinstall.js

undefined postinstall C:\wamp64\www\boston bower install && if [ "$NODE_ENV" = "production" ]; then gulp puppy-build --optimized; else gulp puppy-build; fi

"$NODE_ENV" was unexpected at this time.

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\chokidar\node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.0.15: wanted {"os":"darwin","arch": "any"} (current: {"os":"win32","arch":"x64"}) npm ERR! Windows_NT 6.1.7601 npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" " install" npm ERR! node v6.9.1 npm ERR! npm v3.10.8 npm ERR! code ELIFECYCLE npm ERR! undefined postinstall: bower install && if [ "$NODE_ENV" = "production" ]; then gulp puppy-build --optimize d; else gulp puppy-build; fi npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the undefined postinstall script 'bower install && if [ "$NODE_ENV" = "production" ]; then gulp pu ppy-build --optimized; else gulp puppy-build; fi'. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! bower install && if [ "$NODE_ENV" = "production" ]; then gulp puppy-build --optimized; else gulp puppy-b uild; fi npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request: npm ERR! C:\wamp64\www\boston\npm-debug.log

...gram Files\cmder/vendor/clink-completions/npm_prompt.lua:11: attempt to concatenate local 'packag value)on' (a nil`

mau-ferrusca commented 7 years ago

I get the folliwing error while $npm install:

> undefined postinstall C:\xampp\htdocs\boston-built-master
> bower install && if [ "$NODE_ENV" = "production" ]; then gulp puppy-build --optimized; else gulp puppy-build; fi

Any ideas what I should do?

Thanks.

razinbunsu commented 6 years ago

Most probably the issue is caused by outdated dependencies. What I do is I remove node_modules directory and reinstall latest packages based on package.json file. Then, I manually npm install the dependencies one by one. Here is how my package.json looks like:

{
    "private": true,
    "engines": {
        "node": ">=0.12.0"
    },
    "main": "index.js",
    "scripts": {
        "start": "node index.js",
        "postinstall": "bower install && if [ \"$NODE_ENV\" = \"production\" ]; then gulp puppy-build --optimized; else gulp puppy-build; fi"
    },
    "dependencies": {
        "basic-auth": "^2.0.0",
        "bower": "^1.8.2",
        "del": "^3.0.0",
        "express": "^4.16.2",
        "front-matter": "^2.3.0",
        "glob": "^7.1.2",
        "gulp": "^3.9.1",
        "gulp-autoprefixer": "^4.1.0",
        "gulp-clean-css": "^3.9.2",
        "gulp-data": "^1.2.1",
        "gulp-debug": "^3.2.0",
        "gulp-htmlmin": "^4.0.0",
        "gulp-if": "^2.0.2",
        "gulp-load-plugins": "^1.5.0",
        "gulp-modernizr": "^1.0.0-alpha",
        "gulp-rename": "^1.2.2",
        "gulp-sass": "^3.1.0",
        "gulp-sourcemaps": "^2.6.3",
        "gulp-twig": "^1.1.1",
        "gulp-uglify": "^3.0.0",
        "gulp-useref": "^3.1.4",
        "gulp-util": "^3.0.8",
        "gulp-watch": "^4.3.11",
        "run-sequence": "^2.2.0",
        "yargs": "^10.0.3"
    },
    "devDependencies": {
        "browser-sync": "^2.23.2"
    }
}

Hopefully there is a better way than this.