Mystery build error on existing static deployment

Hi,

I hope you can help.
I’m getting a build error on an existing static deployment - we are running 2 versions staging and master, staging builds fine but master throws the following:

Mar 24 03:32:53 PM  node:internal/modules/cjs/loader:936
Mar 24 03:32:53 PM    throw err;
Mar 24 03:32:53 PM    ^
Mar 24 03:32:53 PM  Error: Cannot find module 'markdown-it-emoji/lib/data/full.json'
Mar 24 03:32:53 PM  Require stack:
Mar 24 03:32:53 PM  - /opt/render/project/src/node_modules/@vuepress/shared-utils/lib/parseEmojis.js
Mar 24 03:32:53 PM  - /opt/render/project/src/node_modules/@vuepress/shared-utils/lib/parseHeaders.js
Mar 24 03:32:53 PM  - /opt/render/project/src/node_modules/@vuepress/shared-utils/lib/deeplyParseHeaders.js
Mar 24 03:32:53 PM  - /opt/render/project/src/node_modules/@vuepress/shared-utils/lib/index.js
Mar 24 03:32:53 PM  - /opt/render/project/src/node_modules/vuepress/lib/checkEnv.js
Mar 24 03:32:53 PM  - /opt/render/project/src/node_modules/vuepress/cli.js
Mar 24 03:32:53 PM      at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
Mar 24 03:32:53 PM      at Function.Module._load (node:internal/modules/cjs/loader:778:27)
Mar 24 03:32:53 PM      at Module.require (node:internal/modules/cjs/loader:1005:19)
Mar 24 03:32:53 PM      at require (node:internal/modules/cjs/helpers:102:18)
Mar 24 03:32:53 PM      at Object.<anonymous> (/opt/render/project/src/node_modules/@vuepress/shared-utils/lib/parseEmojis.js:6:37)
Mar 24 03:32:53 PM      at Module._compile (node:internal/modules/cjs/loader:1103:14)
Mar 24 03:32:53 PM      at Object.Module._extensions..js (node:internal/modules/cjs/loader:1157:10)
Mar 24 03:32:53 PM      at Module.load (node:internal/modules/cjs/loader:981:32)
Mar 24 03:32:53 PM      at Function.Module._load (node:internal/modules/cjs/loader:822:12)
Mar 24 03:32:53 PM      at Module.require (node:internal/modules/cjs/loader:1005:19) {
Mar 24 03:32:53 PM    code: 'MODULE_NOT_FOUND',
Mar 24 03:32:53 PM    requireStack: [
Mar 24 03:32:53 PM      '/opt/render/project/src/node_modules/@vuepress/shared-utils/lib/parseEmojis.js',
Mar 24 03:32:53 PM      '/opt/render/project/src/node_modules/@vuepress/shared-utils/lib/parseHeaders.js',
Mar 24 03:32:53 PM      '/opt/render/project/src/node_modules/@vuepress/shared-utils/lib/deeplyParseHeaders.js',
Mar 24 03:32:53 PM      '/opt/render/project/src/node_modules/@vuepress/shared-utils/lib/index.js',
Mar 24 03:32:53 PM      '/opt/render/project/src/node_modules/vuepress/lib/checkEnv.js',
Mar 24 03:32:53 PM      '/opt/render/project/src/node_modules/vuepress/cli.js'
Mar 24 03:32:53 PM    ]
Mar 24 03:32:53 PM  }
Mar 24 03:32:53 PM  ==> Build failed 😞

To test I’ve created another static site that is pulling from same branch and commit as the erroring site and that builds fine, I’m not sure what to do to fix it, any help would be greatly appreciated.

Many thanks

@Mike_Watts,

Happy to take a look here - can you let us know the name of the service that you’re having issues with? Feel free to DM or email support@render.com if you don’t want to share it here.

Hi Jade - thanks for your quick response.
I’ve sent a DM with details, thanks

Hi Again Jade

I may have found the problem - it looks like setting the NODE_ENV to production was breaking it for some reason. I’ve removed that and all is working, but not sure why.

Thanks again

@Mike_Watts,

I’m glad to hear that you were able to clear that up! It’s possible that the issue you were running into was due to the devDependencies not getting installed. When NODE_ENV is set to production during build time, npm install will only install dependencies and not dev dependencies.

We set NODE_ENV to production at runtime: https://render.com/docs/environment-variables#node , so you can remove the value to get both devDependencies and dependencies installed during build time, and still have the app run in production mode.

Ah thanks for clearing that up Jade, mystery solved!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.