bound svg2png errored when running npm run dev (node 7 & npm v3.10.8 & win 10)
See original GitHub issue‘bound svg2png’ errored after 1.19 s [12:28:40] Error in plugin ‘gulp-svg2png’ Message: Error while converting image.Error: TypeError: ‘undefined’ is not a function (evaluating ‘el.getBBox()’)
phantomjs://webpage.evaluate():5 phantomjs://webpage.evaluate():35 phantomjs://webpage.evaluate():35 Unable to calculate dimensions. TypeError: ‘null’ is not an object (evaluating ‘dimensions.width’) Details: domain: [object Object] domainThrown: true [12:28:40] ‘ccss’ errored after 1.28 s [12:28:40] ‘dev’ errored after 2.82 s [12:28:40] The following tasks did not complete: mainBundles [12:28:40] Did you forget to signal async completion?
npm ERR! Windows_NT 10.0.10586
npm ERR! argv “C:\Program Files (x86)\nodejs\node.exe” “C:\Program Files (x86)\nodejs\node_modules\npm\bin\npm-cli.js” “run” “dev”
npm ERR! node v7.0.0
npm ERR! npm v3.10.8
npm ERR! code ELIFECYCLE
npm ERR! react-pwa-reference@0.1.0 dev: npm run lint && gulp dev
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the react-pwa-reference@0.1.0 dev script ‘npm run lint && gulp dev’.
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 react-pwa-reference package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! npm run lint && gulp dev
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs react-pwa-reference
npm ERR! Or if that isn’t available, you can get their info via:
npm ERR! npm owner ls react-pwa-reference
npm ERR! There is likely additional logging output above.
Issue Analytics
- State:
- Created 7 years ago
- Comments:23 (12 by maintainers)
Top GitHub Comments
Final solution to make it work on Windows:
Pre-reqs:
Steps to follow:
git clone https://github.com/localnerve/react-pwa-reference
or download the repo here and unzip it infolder_X // this is a folder of your choice
cmd.exe
in elevated mode (Administrator mode)folder_X (folder that contains the unzipped source code)
using command:cd folder_X
npm install
src/build/ccss.js
file with this version that omits the svg2png fallback creation stepnpm run build:server
package.json
and replace line 46"start": "node -e 'process.env.NODE_ENV=process.env.NODE_ENV || \"production\"; require(\"./output/application/server\");'",
by"start": "set process.env.NODE_ENV=production && set PORT=3000 && node ./output/application/server/index.js",
npm start
I’m setting up a windows VM right now. Just so I can replicate, what environment are you running in? CMD? git-bash?