Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pinax tutorial for installation not working on windows #152

Open
Jay-Dai opened this issue Sep 21, 2019 · 7 comments
Open

Pinax tutorial for installation not working on windows #152

Jay-Dai opened this issue Sep 21, 2019 · 7 comments

Comments

@Jay-Dai
Copy link

Jay-Dai commented Sep 21, 2019

Following exactly the recommended procedure for installing pinax from the official documentation, I can't get pinax to work.

https://pinaxproject.com/pinax/quick_start/

There seems to be a problem during the NPM installation of packages.

I am using Windows 8.1 and I only have Python 3.6.8 installed on my computer.

All commands used :

pip install virtualenv
virtualenv mysiteenv
mysiteenv\env\Scripts\activate.bat
pip install pinax-cli
pinax start account mysite
cd mysite
npm install
pip install -r requirements.txt
manage.py migrate
manage.py loaddata sites
npm run dev

Results :

D:\Google Drive Pro\Side>pip install virtualenv
Requirement already satisfied: virtualenv in c:\users\jacques\appdata\local\prog
rams\python\python36\lib\site-packages (16.6.1)
You are using pip version 18.1, however version 19.2.3 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' comm
and.

D:\Google Drive Pro\Side>virtualenv mysiteenv
Using base prefix 'c:\\users\\jacques\\appdata\\local\\programs\\python\\python3
6'
New python executable in D:\Google Drive Pro\Side\mysiteenv\Scripts\python.exe
Installing setuptools, pip, wheel...
done.

D:\Google Drive Pro\Side>mysiteenv\Scripts\activate.bat

(mysiteenv) D:\Google Drive Pro\Side>pip install pinax-cli
Collecting pinax-cli
  Using cached https://files.pythonhosted.org/packages/ce/39/bcdcb441db93528dcb2
484ffb99f8cfec59fcafe99e5f8fa24e9210d8f68/pinax_cli-1.1.4-py3-none-any.whl
Collecting crayons>=0.1.2 (from pinax-cli)
  Using cached https://files.pythonhosted.org/packages/b6/ee/1a4f411c66f2788baf8
2a91b6f726473d9f4075ec7b86c860ba15294ce90/crayons-0.2.0-py2.py3-none-any.whl
Collecting django>=2.0; python_version >= "3" (from pinax-cli)
  Using cached https://files.pythonhosted.org/packages/94/9f/a56f7893b1280e50194
82260e246ab944d54a9a633a01ed04683d9ce5078/Django-2.2.5-py3-none-any.whl
Collecting click>=6.7 (from pinax-cli)
  Using cached https://files.pythonhosted.org/packages/fa/37/45185cb5abbc30d7257
104c434fe0b07e5a195a6847506c074527aa599ec/Click-7.0-py2.py3-none-any.whl
Collecting requests>=2.18.4 (from pinax-cli)
  Using cached https://files.pythonhosted.org/packages/51/bd/23c926cd341ea6b7dd0
b2a00aba99ae0f828be89d72b2190f27c11d4b7fb/requests-2.22.0-py2.py3-none-any.whl
Collecting colorama (from crayons>=0.1.2->pinax-cli)
  Using cached https://files.pythonhosted.org/packages/4f/a6/728666f39bfff1719fc
94c481890b2106837da9318031f71a8424b662e12/colorama-0.4.1-py2.py3-none-any.whl
Collecting pytz (from django>=2.0; python_version >= "3"->pinax-cli)
  Using cached https://files.pythonhosted.org/packages/87/76/46d697698a143e05f77
bec5a526bf4e56a0be61d63425b68f4ba553b51f2/pytz-2019.2-py2.py3-none-any.whl
Collecting sqlparse (from django>=2.0; python_version >= "3"->pinax-cli)
  Using cached https://files.pythonhosted.org/packages/ef/53/900f7d2a54557c6a378
86585a91336520e5539e3ae2423ff1102daf4f3a7/sqlparse-0.3.0-py2.py3-none-any.whl
Collecting idna<2.9,>=2.5 (from requests>=2.18.4->pinax-cli)
  Using cached https://files.pythonhosted.org/packages/14/2c/cd551d81dbe15200be1
cf41cd03869a46fe7226e7450af7a6545bfc474c9/idna-2.8-py2.py3-none-any.whl
Collecting certifi>=2017.4.17 (from requests>=2.18.4->pinax-cli)
  Using cached https://files.pythonhosted.org/packages/18/b0/8146a4f8dd402f60744
fa380bc73ca47303cccf8b9190fd16a827281eac2/certifi-2019.9.11-py2.py3-none-any.whl

Collecting urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 (from requests>=2.18.4->pinax
-cli)
  Using cached https://files.pythonhosted.org/packages/81/b7/cef47224900ca67078e
d6e2db51342796007433ad38329558f56a15255f5/urllib3-1.25.5-py2.py3-none-any.whl
Collecting chardet<3.1.0,>=3.0.2 (from requests>=2.18.4->pinax-cli)
  Using cached https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b64
87b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl
Installing collected packages: colorama, crayons, pytz, sqlparse, django, click,
 idna, certifi, urllib3, chardet, requests, pinax-cli
Successfully installed certifi-2019.9.11 chardet-3.0.4 click-7.0 colorama-0.4.1
crayons-0.2.0 django-2.2.5 idna-2.8 pinax-cli-1.1.4 pytz-2019.2 requests-2.22.0
sqlparse-0.3.0 urllib3-1.25.5

(mysiteenv) D:\Google Drive Pro\Side>pinax start account mysite
Starting project from Pinax
Finished

(mysiteenv) D:\Google Drive Pro\Side>cd mysite

(mysiteenv) D:\Google Drive Pro\Side\mysite>npm install
npm WARN deprecated browserslist@2.11.3: Browserslist 2 could fail on reading Br
owserslist >3.0 config used in other tools.
npm WARN deprecated left-pad@1.3.0: use String.prototype.padStart()
npm WARN deprecated browserslist@1.7.7: Browserslist 2 could fail on reading Bro
wserslist >3.0 config used in other tools.
npm WARN deprecated hawk@3.1.3: This module moved to @hapi/hawk. Please make sur
e to switch over as this distribution is no longer supported and may contain bug
s and critical security issues.
npm WARN deprecated flatten@1.0.2: I wrote this module a very long time ago; you
 should use something else.
npm WARN deprecated circular-json@0.3.3: CircularJSON is in maintenance only, fl
atted is its successor.
npm WARN deprecated boom@2.10.1: This version has been deprecated in accordance
with the hapi support policy (hapi.im/support). Please upgrade to the latest ver
sion to get the best features, bug fixes, and security patches. If you are unabl
e to upgrade at this time, paid support is available for older versions (hapi.im
/commercial).
npm WARN deprecated hoek@2.16.3: This version has been deprecated in accordance
with the hapi support policy (hapi.im/support). Please upgrade to the latest ver
sion to get the best features, bug fixes, and security patches. If you are unabl
e to upgrade at this time, paid support is available for older versions (hapi.im
/commercial).
npm WARN deprecated sntp@1.0.9: This module moved to @hapi/sntp. Please make sur
e to switch over as this distribution is no longer supported and may contain bug
s and critical security issues.
npm WARN deprecated cryptiles@2.0.5: This version has been deprecated in accorda
nce with the hapi support policy (hapi.im/support). Please upgrade to the latest
 version to get the best features, bug fixes, and security patches. If you are u
nable to upgrade at this time, paid support is available for older versions (hap
i.im/commercial).
npm WARN deprecated uws@9.14.0: New code is available at github.com/uNetworking/
uWebSockets.js

> uws@9.14.0 install D:\Google Drive Pro\Side\mysite\node_modules\uws
> node-gyp rebuild > build_log.txt 2>&1 || exit 0


> node-sass@4.7.2 install D:\Google Drive Pro\Side\mysite\node_modules\node-sass

> node scripts/install.js

Downloading binary from https://github.com/sass/node-sass/releases/download/v4.7
.2/win32-x64-64_binding.node
Cannot download "https://github.com/sass/node-sass/releases/download/v4.7.2/win3
2-x64-64_binding.node":

HTTP error 404 Not Found

Hint: If github.com is not accessible in your location
      try setting a proxy via HTTP_PROXY, e.g.

      export HTTP_PROXY=http://example.com:1234

or configure npm proxy via

      npm config set proxy http://example.com:8080

> core-js@2.6.9 postinstall D:\Google Drive Pro\Side\mysite\node_modules\core-js

> node scripts/postinstall || echo "ignore"

Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfill
ing JavaScript standard library!

The project needs your help! Please consider supporting of core-js on Open Colle
ctive or Patreon:
> https://opencollective.com/core-js
> https://www.patreon.com/zloirock

Also, the author of core-js ( https://github.com/zloirock ) is looking for a goo
d job -)


> node-sass@4.7.2 postinstall D:\Google Drive Pro\Side\mysite\node_modules\node-
sass
> node scripts/build.js

Building: C:\Program Files\nodejs\node.exe D:\Google Drive Pro\Side\mysite\node_
modules\node-gyp\bin\node-gyp.js rebuild --verbose --libsass_ext= --libsass_cfla
gs= --libsass_ldflags= --libsass_library=
gyp info it worked if it ends with ok
gyp verb cli [ 'C:\\Program Files\\nodejs\\node.exe',
gyp verb cli   'D:\\Google Drive Pro\\Side\\mysite\\node_modules\\node-gyp\\bin\
\node-gyp.js',
gyp verb cli   'rebuild',
gyp verb cli   '--verbose',
gyp verb cli   '--libsass_ext=',
gyp verb cli   '--libsass_cflags=',
gyp verb cli   '--libsass_ldflags=',
gyp verb cli   '--libsass_library=' ]
gyp info using node-gyp@3.8.0
gyp info using node@10.15.3 | win32 | x64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb check python checking for Python executable "python2" in the PATH
gyp verb `which` failed Error: not found: python2
gyp verb `which` failed     at getNotFoundError (D:\Google Drive Pro\Side\mysite
\node_modules\which\which.js:13:12)
gyp verb `which` failed     at F (D:\Google Drive Pro\Side\mysite\node_modules\w
hich\which.js:68:19)
gyp verb `which` failed     at E (D:\Google Drive Pro\Side\mysite\node_modules\w
hich\which.js:80:29)
gyp verb `which` failed     at D:\Google Drive Pro\Side\mysite\node_modules\whic
h\which.js:89:16
gyp verb `which` failed     at D:\Google Drive Pro\Side\mysite\node_modules\isex
e\index.js:42:5
gyp verb `which` failed     at D:\Google Drive Pro\Side\mysite\node_modules\isex
e\windows.js:36:5
gyp verb `which` failed     at FSReqWrap.oncomplete (fs.js:153:21)
gyp verb `which` failed  python2 { Error: not found: python2
gyp verb `which` failed     at getNotFoundError (D:\Google Drive Pro\Side\mysite
\node_modules\which\which.js:13:12)
gyp verb `which` failed     at F (D:\Google Drive Pro\Side\mysite\node_modules\w
hich\which.js:68:19)
gyp verb `which` failed     at E (D:\Google Drive Pro\Side\mysite\node_modules\w
hich\which.js:80:29)
gyp verb `which` failed     at D:\Google Drive Pro\Side\mysite\node_modules\whic
h\which.js:89:16
gyp verb `which` failed     at D:\Google Drive Pro\Side\mysite\node_modules\isex
e\index.js:42:5
gyp verb `which` failed     at D:\Google Drive Pro\Side\mysite\node_modules\isex
e\windows.js:36:5
gyp verb `which` failed     at FSReqWrap.oncomplete (fs.js:153:21)
gyp verb `which` failed   stack:
gyp verb `which` failed    'Error: not found: python2\n    at getNotFoundError (
D:\\Google Drive Pro\\Side\\mysite\\node_modules\\which\\which.js:13:12)\n    at
 F (D:\\Google Drive Pro\\Side\\mysite\\node_modules\\which\\which.js:68:19)\n
  at E (D:\\Google Drive Pro\\Side\\mysite\\node_modules\\which\\which.js:80:29)
\n    at D:\\Google Drive Pro\\Side\\mysite\\node_modules\\which\\which.js:89:16
\n    at D:\\Google Drive Pro\\Side\\mysite\\node_modules\\isexe\\index.js:42:5\
n    at D:\\Google Drive Pro\\Side\\mysite\\node_modules\\isexe\\windows.js:36:5
\n    at FSReqWrap.oncomplete (fs.js:153:21)',
gyp verb `which` failed   code: 'ENOENT' }
gyp verb check python checking for Python executable "python" in the PATH
gyp verb `which` succeeded python D:\Google Drive Pro\Side\mysiteenv\Scripts\pyt
hon.EXE
gyp ERR! configure error
gyp ERR! stack Error: Command failed: D:\Google Drive Pro\Side\mysiteenv\Scripts
\python.EXE -c import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack   File "<string>", line 1
gyp ERR! stack     import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack                                ^
gyp ERR! stack SyntaxError: invalid syntax
gyp ERR! stack
gyp ERR! stack     at ChildProcess.exithandler (child_process.js:294:12)
gyp ERR! stack     at ChildProcess.emit (events.js:189:13)
gyp ERR! stack     at maybeClose (internal/child_process.js:970:16)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_proces
s.js:259:5)
gyp ERR! System Windows_NT 6.3.9600
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "D:\\Google Drive Pro\\Si
de\\mysite\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--l
ibsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd D:\Google Drive Pro\Side\mysite\node_modules\node-sass
gyp ERR! node -v v10.15.3
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
Build failed with error code: 1
npm WARN bootstrap@4.0.0 requires a peer of popper.js@^1.12.9 but none is instal
led. You must install peer dependencies yourself.
npm WARN ajv-keywords@3.4.1 requires a peer of ajv@^6.9.1 but none is installed.
 You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules\fse
vents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@
1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}
)

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass@4.7.2 postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass@4.7.2 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional log
ging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Jacques\AppData\Roaming\npm-cache\_logs\2019-09-21T04_20_0
9_848Z-debug.log


(mysiteenv) D:\Google Drive Pro\Side\mysite>manage.py migrate

(mysiteenv) D:\Google Drive Pro\Side\mysite>manage.py loaddata sites

(mysiteenv) D:\Google Drive Pro\Side\mysite>npm run dev

> @ dev D:\Google Drive Pro\Side\mysite
> concurrently --raw "./manage.py runserver" "npm run watch" "npm run dev:browse
r-sync"

'.' n'est pas reconnu en tant que commande interne
ou externe, un programme exécutable ou un fichier de commandes.

> @ watch D:\Google Drive Pro\Side\mysite
> npm run clean && npm run copy:images && npm run build:css && concurrently --ra
w "npm run watch:lint" "npm run watch:js" "npm run watch:css"


> @ dev:browser-sync D:\Google Drive Pro\Side\mysite
> browser-sync start --no-open --proxy localhost:8000 --files "static/dist/js/*.
js, static/dist/css/*.css"


> @ clean D:\Google Drive Pro\Side\mysite
> rm -rf static/dist && mkdir -p static/dist/js && mkdir -p static/dist/css && m
kdir -p static/dist/images

La syntaxe de la commande n'est pas correcte.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ clean: `rm -rf static/dist && mkdir -p static/dist/js && mkdir -p sta
tic/dist/css && mkdir -p static/dist/images`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ clean script.
npm ERR! This is probably not a problem with npm. There is likely additional log
ging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Jacques\AppData\Roaming\npm-cache\_logs\2019-09-21T04_29_4
6_521Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ watch: `npm run clean && npm run copy:images && npm run build:css &&
concurrently --raw "npm run watch:lint" "npm run watch:js" "npm run watch:css"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ watch script.
npm ERR! This is probably not a problem with npm. There is likely additional log
ging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Jacques\AppData\Roaming\npm-cache\_logs\2019-09-21T04_29_4
6_545Z-debug.log
[Browsersync] Proxying: http://localhost:8000
[Browsersync] Access URLs:
 -------------------------------------
       Local: http://localhost:3000
    External: http://192.168.0.10:3000
 -------------------------------------
          UI: http://localhost:3001
 UI External: http://192.168.0.10:3001
 -------------------------------------
[Browsersync] Watching files...

Here is the NPM Debug file :
2019-09-21T04_20_09_848Z-debug.log

When I go to "http://localhost:3000" I get an infinite loading page

Load forever

I see this in the errors :

Error: not found: python2\n    at getNotFoundError (
D:\\Google Drive Pro\\Side\\mysite\\node_modules\\which\\which.js:13:12)\n    at
 F (D:\\Google Drive Pro\\Side\\mysite\\node_modules\\which\\which.js:68:19)\n
  at E (D:\\Google Drive Pro\\Side\\mysite\\node_modules\\which\\which.js:80:29)
\n    at D:\\Google Drive Pro\\Side\\mysite\\node_modules\\which\\which.js:89:16
\n    at D:\\Google Drive Pro\\Side\\mysite\\node_modules\\isexe\\index.js:42:5\
n    at D:\\Google Drive Pro\\Side\\mysite\\node_modules\\isexe\\windows.js:36:5
\n    at FSReqWrap.oncomplete (fs.js:153:21)

Does Pinax have python 2 in its requirements ? What else could be the cause of Pinax not working ?

@Jay-Dai Jay-Dai changed the title Tutorial not working on windows Pinax tutorial for installation not working on windows Sep 21, 2019
@KatherineMichel
Copy link
Member

@Jay-Dai Hello, I believe the problem is that there is a Unix command in the npm script that is not compatible with Windows.

npm ERR! @ clean: `rm -rf static/dist && mkdir -p static/dist/js && mkdir -p sta
tic/dist/css && mkdir -p static/dist/images`

In Windows del is used instead of rm.
https://stackoverflow.com/questions/17607612/equivalent-of-rm-and-mv-in-windows-cmd/17607871

@terminator0309
Copy link

gyp verb check python checking for Python executable "python2" in the PATH
gyp verb which failed Error: not found: python2

I think this is the main issue.
May be this works only on python2

@kiran-capoor94
Copy link

kiran-capoor94 commented Apr 1, 2020

Node-gyp is a prerequisite for the node-sass@4.72 package, which in turn requires for us to install windows-build-tools as a mandatory requirement.

Check node-sass: https://www.npmjs.com/package/node-sass

Check node-gyp: https://github.com/nodejs/node-gyp#on-windows

Installing node-sass@4.13.1 works with Python3 no issues at all. Still need to check which package has a dependency on node-sass@4.7.2 specifically

Below package.json works, need to figure out how to clean the folder before watching static/dist

{
  "repository": {
    "type": "git",
    "url": "https://github.com/pinax/pinax-project"
  },
  "scripts": {
    "clean": "mkdirp static/dist/js && mkdirp static/dist/css && mkdirp static/dist/images",
    "build:js": "browserify -t [ babelify --presets [ env ] ] -t envify -o static/dist/js/site.js static/src/js/index.js",
    "build:css": "node-sass static/src/scss/index.scss static/dist/css/app.css",
    "copy:images": "cp -r static/src/images/* static/dist/images/ 2>/dev/null || :",
    "optimize:js": "uglifyjs static/dist/js/site.js -m -c warnings=false -o static/dist/js/site.js",
    "optimize:css": "cssnano static/dist/css/app.css static/dist/css/app.css",
    "optimize": "npm run optimize:js && npm run optimize:css",
    "watch:test": "onchange static/src/js/**/*.js -- npm run test",
    "watch:lint": "onchange static/src/js/**/*.js -- npm run lint",
    "watch:js": "watchify -t [ babelify --presets [ env ] ] -t envify static/src/js/index.js -o static/dist/js/site.js -d",
    "watch:css": "node-sass static/src/scss/index.scss static/dist/css/app.css --watch -r",
    "build": "npm run clean && concurrently \"npm run build:js\" \"npm run build:css\" \"npm run copy:images\" && npm run optimize",
    "watch": "npm run clean && npm run build:css && concurrently --raw \"npm run watch:lint\" \"npm run watch:js\" \"npm run watch:css\"",
    "dev:browser-sync": "browser-sync start --no-open --proxy localhost:8000 --files \"static/dist/js/*.js, static/dist/css/*.css\"",
    "dev": "concurrently --raw \"python manage.py runserver\" \"npm run watch\" \"npm run dev:browser-sync\"",
    "lint": "eslint static/src/**/**/*.js",
    "test": "mocha --recursive --compilers js:babel-register static/src/tests/index.js",
    "compile": "NODE_ENV=production npm run clean && concurrently \"npm run copy:images\" \"npm run build:js\" \"npm run build:css\"",
    "heroku-postbuild": "npm run compile && npm run optimize"
  },
  "license": "UNLICENSED",
  "dependencies": {
    "babel-core": "^6.26.0",
    "babel-preset-env": "^1.6.1",
    "babelify": "^8.0.0",
    "bootstrap": "^4.4.1",
    "browser-sync": "^2.26.7",
    "browserify": "^15.2.0",
    "chai": "^4.1.2",
    "concurrently": "^3.5.1",
    "cssnano": "^4.1.10",
    "cssnano-cli": "^1.0.5",
    "envify": "^4.1.0",
    "eslint": "^4.16.0",
    "eslint-plugin-babel": "^4.1.2",
    "exorcist": "^1.0.0",
    "jquery": "^3.4.1",
    "jsdom": "^11.6.2",
    "jsdom-global": "3.0.2",
    "mocha": "5.0.0",
    "node-sass": "^4.13.1",
    "onchange": "^6.1.0",
    "uglify-js": "^3.3.9",
    "watchify": "^3.11.1"
  }
}

@KatherineMichel
Copy link
Member

@kiran-capoor94 Is this something you'd be willing to submit a PR for in the pinax-starter-projects repo? We're wrapping up a new release and it would be great to include this since it's been a longstanding problem for people using Windows. https://github.com/pinax/pinax-starter-projects/blob/account/package.json

@wmamul
Copy link

wmamul commented Jul 20, 2020

Just like @kiran-capoor94 stated, windows-build-tools is required on Microsoft's operating system to install node-gyp.

I've managed to fix the different os problem using run-script-os package for JS and modifying package.json based on what Kiran brought up.
It works on UNIX, didn't test it on Windows though but it should be fine.
I'm going to attach it here, since it isn't clear for me where pinax-cli gets it from and I couldn't find similar file in pinax-starter-projects repository either.

{
  "repository": {
    "type": "git",
    "url": "https://github.com/pinax/pinax-project"
  },
  "scripts": {
        "clean": "run-script-os",
	"clean:windows": "rmdir /s /q static/dist && mkdirp static/dist/js && mkdirp static/dist/css && mkdirp static/dist/images",
	"clean:nix": "rm -rf static/dist && mkdirp static/dist/js && mkdirp static/dist/css && mkdirp static/dist/images",
    "build:js": "browserify -t [ babelify --presets [ env ] ] -t envify -o static/dist/js/site.js static/src/js/index.js",
    "build:css": "node-sass static/src/scss/index.scss static/dist/css/app.css",
    "copy:images": "cp -r static/src/images/* static/dist/images/ 2>/dev/null || :",
    "optimize:js": "uglifyjs static/dist/js/site.js -m -c warnings=false -o static/dist/js/site.js",
    "optimize:css": "cssnano static/dist/css/app.css static/dist/css/app.css",
    "optimize": "npm run optimize:js && npm run optimize:css",
    "watch:test": "onchange static/src/js/**/*.js -- npm run test",
    "watch:lint": "onchange static/src/js/**/*.js -- npm run lint",
    "watch:js": "watchify -t [ babelify --presets [ env ] ] -t envify static/src/js/index.js -o static/dist/js/site.js -d",
    "watch:css": "node-sass static/src/scss/index.scss static/dist/css/app.css --watch -r",
    "build": "npm run clean && concurrently \"npm run build:js\" \"npm run build:css\" \"npm run copy:images\" && npm run optimize",
    "watch": "npm run clean && npm run build:css && concurrently --raw \"npm run watch:lint\" \"npm run watch:js\" \"npm run watch:css\"",
    "dev:browser-sync": "browser-sync start --no-open --proxy localhost:8000 --files \"static/dist/js/*.js, static/dist/css/*.css\"",
    "dev": "concurrently --raw \"python manage.py runserver\" \"npm run watch\" \"npm run dev:browser-sync\"",
    "lint": "eslint static/src/**/**/*.js",
    "test": "mocha --recursive --compilers js:babel-register static/src/tests/index.js",
    "compile": "NODE_ENV=production npm run clean && concurrently \"npm run copy:images\" \"npm run build:js\" \"npm run build:css\"",
    "heroku-postbuild": "npm run compile && npm run optimize"
  },
  "license": "UNLICENSED",
  "dependencies": {
    "babel-core": "^6.26.0",
    "babel-preset-env": "^1.6.1",
    "babelify": "^8.0.0",
    "bootstrap": "^4.4.1",
    "browser-sync": "^2.26.7",
    "browserify": "^15.2.0",
    "chai": "^4.1.2",
    "concurrently": "^3.5.1",
    "cssnano": "^4.1.10",
    "cssnano-cli": "^1.0.5",
    "envify": "^4.1.0",
    "eslint": "^4.16.0",
    "eslint-plugin-babel": "^4.1.2",
    "exorcist": "^1.0.0",
    "jquery": "^3.4.1",
    "jsdom": "^11.6.2",
    "jsdom-global": "3.0.2",
    "mocha": "5.0.0",
    "node-sass": "^4.13.1",
    "onchange": "^6.1.0",
	"run-script-os": "^1.1.1",
    "uglify-js": "^3.3.9",
    "watchify": "^3.11.1"
  }
}

@KatherineMichel
Copy link
Member

@Jay-Dai @terminator0309 @kiran-capoor94 @wmamul Patrick has updated dependencies in Pinax Starter Projects repo... does this solve the problem? pinax/pinax-starter-projects@c0ff9d4

@ghost
Copy link

ghost commented Sep 6, 2020

Waow these error messages seem massive and overwhelming @Jay-Dai hope you've been successful?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants