Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebpackError: ENOENT: no such file or directory, open '//data.trie' #26035

Closed
karandaid opened this issue Jul 27, 2020 · 3 comments
Closed

WebpackError: ENOENT: no such file or directory, open '//data.trie' #26035

karandaid opened this issue Jul 27, 2020 · 3 comments
Assignees

Comments

@karandaid
Copy link

Description

gatsby develop runs okay but I am getting this error when I try to do gatsby build. I tried other similar examples like removing cache and public with gatsby clean and removing node_modules and npm install again. but still having this issue.

Steps to reproduce

I do not know the cause of this issue, it was working before. I think my installed new libraries are causing this (not sure). Today I installed pdfmake.

package.json

{
  "name": "gatsby-starter-hello-world",
  "private": true,
  "description": "A simplified bare-bones starter for Gatsby",
  "version": "0.1.0",
  "license": "MIT",
  "scripts": {
    "build": "gatsby build",
    "develop": "gatsby develop",
    "format": "prettier --write \"**/*.{js,jsx,json,md}\"",
    "start": "npm run develop",
    "serve": "gatsby serve",
    "clean": "gatsby clean",
    "test": "echo \"Write tests! -> https://gatsby.dev/unit-testing\" && exit 1",
    "deploy": "gatsby-plugin-s3 deploy"
  },
  "dependencies": {
    "@aws-amplify/ui-react": "^0.2.9",
    "@material-ui/core": "^4.10.2",
    "@material-ui/icons": "^4.9.1",
    "aws-amplify": "^3.0.18",
    "aws-amplify-react": "^4.1.17",
    "fetch": "^1.1.0",
    "formik": "^2.1.4",
    "gatsby": "^2.22.15",
    "gatsby-plugin-react-helmet": "^3.3.4",
    "gatsby-plugin-s3": "^0.3.4",
    "gatsby-query-params": "^1.2.1",
    "graphql": "^14.7.0",
    "image-to-base64": "^2.1.1",
    "jquery": "^3.5.1",
    "pdfmake": "^0.1.66",
    "react": "^16.12.0",
    "react-dom": "^16.12.0",
    "react-facebook": "^8.1.4",
    "react-helmet": "^6.1.0",
    "react-images": "^1.1.7",
    "react-photo-gallery": "^8.0.0",
    "react-youtube": "^7.11.2"
  },
  "devDependencies": {
    "prettier": "2.0.5"
  },
  "repository": {
    "type": "git",
    "url": "https://github.com/gatsbyjs/gatsby-starter-hello-world"
  },
  "bugs": {
    "url": "https://github.com/gatsbyjs/gatsby/issues"
  }
}

Expected result

It should build properly.

Actual result

> gatsby build

success open and validate gatsby-configs - 0.064s
success load plugins - 0.235s
success onPreInit - 0.010s
success delete html and css files from previous builds - 0.031s
success initialize cache - 0.018s
success copy gatsby files - 0.521s
success onPreBootstrap - 0.097s
success createSchemaCustomization - 0.028s
success source and transform nodes - 0.094s
success building schema - 0.515s
success createPages - 0.003s
success createPagesStatefully - 0.276s
success onPreExtractQueries - 0.005s
success update schema - 0.061s
success extract queries from components - 0.279s
success write out requires - 0.019s
success write out redirect data - 0.005s
success onPostBootstrap - 0.007s
⠀
info bootstrap finished - 11.580s
⠀
success Building production JavaScript and CSS bundles - 124.524s
success Rewriting compilation hashes - 0.012s
success run queries - 125.576s - 9/9 0.07/s
failed Building static HTML for pages - 16.586s

 ERROR #95313

Building static HTML failed

See our docs page for more info on this error: https://gatsby.dev/debug-html





  WebpackError: ENOENT: no such file or directory, open '//data.trie'

  - build-html.js:110 doBuildPages
    [sharan-client]/[gatsby]/dist/commands/build-html.js:110:24


npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build: `gatsby build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\dhali\AppData\Roaming\npm-cache\_logs\2020-07-27T02_49_53_250Z-debug.log

Environment

Run gatsby info --clipboard in your project directory and paste the output here.


  System:
    OS: Windows 10 10.0.18363
    CPU: (8) x64 Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
  Binaries:
    Node: 10.15.1 - C:\Program Files\nodejs\node.EXE
    npm: 6.4.1 - C:\Program Files\nodejs\npm.CMD
  Languages:
    Python: 3.7.3
  Browsers:
    Edge: 44.18362.449.0
  npmPackages:
    gatsby: ^2.22.15 => 2.22.15 
    gatsby-plugin-react-helmet: ^3.3.4 => 3.3.4 
    gatsby-plugin-s3: ^0.3.4 => 0.3.4 
    gatsby-query-params: ^1.2.1 => 1.2.1 
  npmGlobalPackages:
    gatsby-cli: 2.12.46
    gatsby-plugin-s3: 0.3.3
@karandaid karandaid added the type: bug An issue or pull request relating to a bug in Gatsby label Jul 27, 2020
@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Jul 27, 2020
@blainekasten blainekasten removed the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Jul 27, 2020
@blainekasten blainekasten self-assigned this Jul 27, 2020
@blainekasten
Copy link
Contributor

Hey @karandaid, this is an interesting error. Do you have any idea where '//data.trie' comes from?

@karandaid
Copy link
Author

Hey @karandaid, this is an interesting error. Do you have any idea where '//data.trie' comes from?

Seems like it's from pdfmake which uses pdfkit and there is also an issue
Github: PDFKit Issue

@blainekasten
Copy link
Contributor

Ah, thanks for sharing. So this is not a gatsby issue and looks to be solely related to using that library. I'm sorry but I don't think there is any way for us to advise you on this.

I'm going to close the issue as it isn't reporting a bug with Gatsby. Feel free to keep discussing here however if there is anything we can do to help!

@blainekasten blainekasten removed the type: bug An issue or pull request relating to a bug in Gatsby label Jul 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants