skip to Main Content

I’ve created new gatsby project. After successful installation, I tried to run it with command npm run develop and gatsby develop but it is throwing error. Unable to figure out the root cause of error. I tried re installing node_modules but nothing is working! Please Help! Thank you!

ERROR:

D:FCgatsby-shopify-site>npm run develop

> [email protected] develop
> gatsby develop

D:FCgatsby-shopify-sitenode_modulesyoga-layout-prebuiltyoga-layoutbuildReleasenbind.js:53
        throw ex;
        ^

Error: The specified module could not be found.
\?D:FCgatsby-shopify-sitenode_modules@parcelsource-mapparcel_sourcemap_nodeartifactsindex.win32-x64-msvc.node
    at Object.Module._extensions..node (node:internal/modules/cjs/loader:1185:18)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (D:FCgatsby-shopify-sitenode_modules@parcelsource-mapparcel_sourcemap_nodeindex.js:15:18)
    at Module._compile (node:internal/modules/cjs/loader:1103:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1155:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (D:[email protected]:14:18)
    at Module._compile (node:internal/modules/cjs/loader:1103:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1155:10)
    at Module.load (node:internal/modules/cjs/loader:981:32) {
  code: 'ERR_DLOPEN_FAILED'
}

package.json

{
  "name": "test-site",
  "version": "1.0.0",
  "private": true,
  "description": "test-site",
  "keywords": [
    "gatsby"
  ],
  "scripts": {
    "develop": "gatsby develop",
    "start": "gatsby develop",
    "build": "gatsby build",
    "serve": "gatsby serve",
    "clean": "gatsby clean"
  },
  "dependencies": {
    "gatsby": "^4.9.0",
    "react": "^17.0.1",
    "react-dom": "^17.0.1"
  }
}

gatsby-config.js

module.exports = {
    siteMetadata: {
        siteUrl: `https://www.yourdomain.tld`,
    },
    plugins: [

    ]
}

PLEASE HELP!!!

4

Answers


  1. Where (in what folder) have you run npm install?

    In D drive and inside FC folder

    You must install your dependencies inside your project folder, so inside gatsby-shopify-site. In your case, you installed your dependencies in the parent folder (FC),

    Move inside D:FCgatsby-shopify-site and run:

    npm install
    

    Once done:

    gatsby develop
    
    Login or Signup to reply.
  2. Could you try yarn instead?

    npm install -g yarn
    

    and then run your command like this

    yarn run develop
    
    Login or Signup to reply.
  3. Make sure you installed the right node js version for your Windows system.
    As mentioned in the error, it is trying to execute a win32-x64 version. In my case Node website recommended the wrong version when downloading and this was fixed by changing it.

    Error: The specified module could not be found.
    \?D:FCgatsby-shopify-sitenode_modules@parcelsource-mapparcel_sourcemap_nodeartifactsindex.win32-x64-msvc.node
    
    Login or Signup to reply.
  4. I have solved the issue by adding a library of Microsoft Visual C++ 2015 Redistribution on my computer as the package is failing due to a missing library.

    The download link is here: https://aka.ms/vs/17/release/vc_redist.x64.exe

    It took a lot of time for mine to solve. Hope that it will help you.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search