question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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:closed
  • Created 7 years ago
  • Comments:23 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
rmarouncommented, Nov 5, 2016

Final solution to make it work on Windows:

Pre-reqs:

  • git bash version 2.8.1.windows.1 or higher
  • npm 3.10.8 or higher
  • node 6.9.1 or higher
  • cmd.exe => Windows command line interpreter in elevated mode (Administrator)

Steps to follow:

  1. Run command git clone https://github.com/localnerve/react-pwa-reference or download the repo here and unzip it in folder_X // this is a folder of your choice
  2. Run command cmd.exe in elevated mode (Administrator mode)
  3. Go to the folder_X (folder that contains the unzipped source code) using command: cd folder_X
  4. Run command: npm install
  5. Replace the src/build/ccss.js file with this version that omits the svg2png fallback creation step
  6. Run command npm run build:server
  7. Open file 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",
  8. Run command npm start
  9. Go to the following URL: http://localhost:3000
1reaction
localnervecommented, Nov 5, 2016

I’m setting up a windows VM right now. Just so I can replicate, what environment are you running in? CMD? git-bash?

Read more comments on GitHub >

github_iconTop Results From Across the Web

bound svg2png errored when running npm run dev (node 7 & npm ...
'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 ...
Read more >
Error running npm-install #1195 - nodejs/node-gyp - GitHub
Today, I started getting errors when running npm install for my web ... I try to install it: $ npm install node-gyp@3.6.1 >...
Read more >
This npm install is not working on Windows - node.js
After countless hours of debugging and researching, I decided to install on a different machine to see if the problem was with my...
Read more >
Common errors | npm Docs
Some strange issues can be resolved by simply running npm cache clean and trying ... Error: ENOENT, stat 'C:\Users\<user>\AppData\Roaming\npm' on Windows 7.
Read more >
Error starting test web server - Tableau Community
Hello,. As per tableau web data connector, I downloaded git and npm, the cloning went fine; however unable to successfully execute "npm start"...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found