JAMstack Tutorial Issues

Hi, I just tried to follow the tutorial Coding Modern Websites with the JAMstack, Part 1, running into multiple issues!

I’m using a Windows 10 machine.

  • It is not mentioned that you have to install gulp.
    No problem, I did run npm install --global gulp-cli.
  • The first time I tried npm start (Section “Updating the Menu”) I got a bunch of errors.
    Turns out I need to run npm install first. It is a missing step (even when you think this is clear).
  • I still get the following error and unfortunately I’m stuck now. Looks like it has something to do with the natives package.
    [11:18:59] Failed to load external module @babel/register
    [11:18:59] Requiring external module babel-register
    internal/util/inspect.js:31
    const types = internalBinding('types');
                  ^
    
    ReferenceError: internalBinding is not defined
        at internal/util/inspect.js:31:15
        at req_ (C:\Users\USER\Projects\restaurant-template-cms\node_modules\natives\index.js:137:5)
        at require (C:\Users\USER\Projects\restaurant-template-cms\node_modules\natives\index.js:110:12)
        at util.js:25:21
        at req_ (C:\Users\USER\Projects\restaurant-template-cms\node_modules\natives\index.js:137:5)
        at require (C:\Users\USER\Projects\restaurant-template-cms\node_modules\natives\index.js:110:12)
        at fs.js:42:21
        at req_ (C:\Users\USER\Projects\restaurant-template-cms\node_modules\natives\index.js:137:5)
        at Object.req [as require] (C:\Users\USER\Projects\restaurant-template-cms\node_modules\natives\index.js:54:10)
        at Object.<anonymous> (C:\Users\USER\Projects\restaurant-template-cms\node_modules\vinyl-fs\node_modules\graceful-fs\fs.js:1:37)```
    
    

Do you have any advice?

Apart from that the npm audit feature reports 506 vulnerabilities (9 low, 4 moderate, 493 high).

Thanks!

Hi @MartinMa - thanks for pointing out these issues. Sorry you are having trouble! Seems like it would be a good idea to go through this with a fine toothed comb and update this article as things do change quickly and a lot has moved and shifted since it was published.

While we try and see if we can find a way to update the tutorial, tell me a little more about what you are trying to learn and accomplish? Maybe there is a different, more recent tutorial from this year that I can recommend to you instead.

Let me know!

I just ran through the steps outlined - netlify deploy, cloning the repo down, running npm install, and then running npm start. I already had gulp installed and I was able to get the project to run:

you feel confident npm install terminated correctly? It can take quite some time to do so.

Hi @perry, thanks your your answer.

I’m just new to Netlify and would like to try out how things are working. I didn’t know Hugo before, but I have been working with Angular and Vue.

I was able to fix the problem by additionally installing the package “natives” at version 1.1.6 by running npm install natives@1.1.6.
See the following issue comment on After update to Node 11.0.0 running Gulp exits with ‘ReferenceError: internalBinding is not defined’.

In your screenshot it looks like you are using MinGW. Did you try the standard windows terminal (or PowerShell), too?

I can imagine that this is a Windows specific problem, which does not occur in Linux/Mac environments, where the terminal is very similar.

Here are a few things about my environment.
Windows 10
Node v10.16.0
npm 6.4.1
Gulp CLI version: 2.2.0

I would like to add something, but have to create this new post, because apparently new users are only allowed to post one link per post.

As per npmjs.com the natives package is deprecated. So it would probably a good idea to find a way to update the example project. But I’m not sure how, as gulp seems to be depending it.

Yeah I’ve been moving our starters away from gulp entirely, there are a number of dependency issues.