Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

App Engine is not installing vite dependecy

Hello, I'm trying to deploy my nodejs app with App Engine wiht this package.json:

 

 

{
  "name": "my-app",
  "description": "",
  "version": "1.0.0",
  "keywords": [
  ],

  "files": [],
  "license": "UNLICENSED",
  "scripts": {
    "dev": "vite",
    "start": "vite",
    "build": "vite build --outDir dist --base './'",
    "test": "tsc --no-emit",
    "preview": "vite preview"
  },
  "private": true,
  "dependencies": {
    "@types/google.maps": "^3.51.0",
    "typescript": "^4.9.4",
    "vite": "^3.2.5"
  }
}

 

 

but this error occurs:

Error: ENOENT: no such file or directory, mkdir '/workspace/node_modules/.vite/deps_temp' at Object.mkdirSync (node:fs:1396:3) at runOptimizeDeps (file:///workspace/node_modules/vite/dist/node/chunks/dep-2faf2534.js:41803:14) at Timeout._onTimeout (file:///workspace/node_modules/vite/dist/node/chunks/dep-2faf2534.js:41212:54) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {

the vite depedency is on packacge.json, I don't understend why this errors occurs.

0 3 893
3 REPLIES 3

Hi @Bonatto,

Welcome to the Google Cloud Community!

The application is expected to find a directory at /workspace/node_modules/.vite/deps_temp but it doesn't exist. What you can do here is create the expected directory structure.

You can also try running npm install if you haven't yet. 

Another troubleshooting option is using the recursive option:

fs.mkdir('./path/to/dir', {recursive: true}, err => {})

 You can check out this Stack Overflow post as you might have the same problem.

If the above options don't work, you can contact Google Cloud Support to further look into your case. Let me know if it helped, thanks!

Do you first build your App locally and then try to deploy the built package?

 

..... NoCommandLine ......
 https://nocommandline.com
A GUI for Google App Engine

@Bonatto I am also trying to deploy a vite app to app engine. But mine says unable to read package.json. Do you know what could be the possible issue?. Also if possible can you please share you app.yaml file