Comments (8)
Hmm, I can't reproduce this locally, and also not on the shared demo instance where I checked your URL www.db.no. Can you try again, please?
from pagespeed-inslides.
What versions of node / npm are you running?
I am running on Windows 10
node v6.9.4
npm v3.10.10
Tried different URL now, still same error:
C:\github\pagespeed-inslides>npm run start
[email protected] start C:\github\pagespeed-inslides
node index.js
PageSpeed InSlides™ running at http://:::3000
From Phantom.js (console.log): Running extractor
From Phantom.js (phantomCallback): type object
warn: exit() was called before waiting for commands to finish. Make sure you are not calling exit() prematurely.
HTML5 slides Pug template successfully written
https://www.googleapis.com/pagespeedonline/v2/runPagespeed?url=https%3A%2F%2Fwww.google.com&filter_third_party_resources=false&locale=en&screenshot=true&strategy=mobile&key=AIzaSyCYRWl02bU7CA2-eGKQ4m6v40Nlrvu0oVI
Error: C:\github\pagespeed-inslides\views\dynamic.pug:9:1
Unexpected block slides
at makeError (C:\github\pagespeed-inslides\node_modules\pug-error\index.js:32:13)
at error (C:\github\pagespeed-inslides\node_modules\pug-linker\index.js:7:30)
at C:\github\pagespeed-inslides\node_modules\pug-linker\index.js:47:9
at Array.forEach (native)
at link (C:\github\pagespeed-inslides\node_modules\pug-linker\index.js:45:20)
at compileBody (C:\github\pagespeed-inslides\node_modules\pug\lib\index.js:170:9)
at Object.exports.compile (C:\github\pagespeed-inslides\node_modules\pug\lib\index.js:242:16)
at handleTemplateCache (C:\github\pagespeed-inslides\node_modules\pug\lib\index.js:215:25)
at Object.exports.renderFile (C:\github\pagespeed-inslides\node_modules\pug\lib\index.js:427:10)
at Object.exports.renderFile (C:\github\pagespeed-inslides\node_modules\pug\lib\index.js:417:21)
from pagespeed-inslides.
I am testing on Node 6, 8, and 9 on Linux and Mac, and it works fine here. Just to be sure the installs are correct, can you delete the node_modules folder and run npm install
again, please?
from pagespeed-inslides.
tarjei@linuxlab01:~/pagespeed-inslides$ npm --version
5.6.0
Got it running on a Ubuntu machine with the following versions:
node --version v9.11.1
npm --version 5.6.0
But the error still persists on Windows 10
Even after upgrading to versions:
npm: 5.6.0
node: v8.11.1
I have tried removing node_modules and reinstalling by the way.
Will retry that after the upgrade now.
Tried to do npm install again after upgrading to the versions above, still the same error.
from pagespeed-inslides.
By the way, when I try to run pug-cli on the dynamic.pug I get the following:
C:\github\pagespeed-inslides\views>pug dynamic.pug
C:\Users\tarje\AppData\Roaming\npm\node_modules\pug-cli\node_modules\pug-linker\index.js:7
throw require('pug-error').apply(null, arguments);
^
Error: dynamic.pug:9:1
Unexpected block slides
at makeError (C:\Users\tarje\AppData\Roaming\npm\node_modules\pug-cli\node_modules\pug-error\index.js:32:13)
at error (C:\Users\tarje\AppData\Roaming\npm\node_modules\pug-cli\node_modules\pug-linker\index.js:7:30)
at C:\Users\tarje\AppData\Roaming\npm\node_modules\pug-cli\node_modules\pug-linker\index.js:47:9
at Array.forEach ()
at link (C:\Users\tarje\AppData\Roaming\npm\node_modules\pug-cli\node_modules\pug-linker\index.js:45:20)
at compileBody (C:\Users\tarje\AppData\Roaming\npm\node_modules\pug-cli\node_modules\pug\lib\index.js:170:9)
at Object.exports.compile (C:\Users\tarje\AppData\Roaming\npm\node_modules\pug-cli\node_modules\pug\lib\index.js:242:16)
at handleTemplateCache (C:\Users\tarje\AppData\Roaming\npm\node_modules\pug-cli\node_modules\pug\lib\index.js:215:25)
at Object.exports.compileFile (C:\Users\tarje\AppData\Roaming\npm\node_modules\pug-cli\node_modules\pug\lib\index.js:356:10)
at renderFile (C:\Users\tarje\AppData\Roaming\npm\node_modules\pug-cli\index.js:256:18)
C:\github\pagespeed-inslides\views>
from pagespeed-inslides.
Could it be some Windows / Linux formatting thing?
from pagespeed-inslides.
The Webstorm linter is finding a couple of things it doesnt like in the top of the dynamic,pug
from pagespeed-inslides.
I see, I think this is because of PhantomJS showing its age, and explains why it fails only on Windows. I have a migration to Puppeteer on my list, I'm closing this issue and opening a new one focusing on the migration instead.
from pagespeed-inslides.
Related Issues (6)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pagespeed-inslides.