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

Nextjs app crash at launch because of triples #31891

Closed
melsiir opened this issue Nov 28, 2021 · 7 comments · Fixed by #31938
Closed

Nextjs app crash at launch because of triples #31891

melsiir opened this issue Nov 28, 2021 · 7 comments · Fixed by #31938
Assignees
Labels
SWC Related to minification/transpilation in Next.js.

Comments

@melsiir
Copy link

melsiir commented Nov 28, 2021

What version of Next.js are you using?

12.0.4

What version of Node.js are you using?

v16.11.0

What browser are you using?

Chrome

What operating system are you using?

Android termux

How are you deploying your application?

npm run dev

Describe the Bug

I created my next app via : npx create-next-app

but when I navigate to my project and run : (npm run dev ) the server will start but I will get this error also :
npm run dev

dev
next dev

ready - started server on 0.0.0.0:3000, url: http://localhost:3000
Watchpack Error (watcher): Error: EACCES: permission denied, watch '/data/data'
Watchpack Error (watcher): Error: EACCES: permission denied, watch '/data'
Watchpack Error (initial scan): Error: EACCES: permission denied, scandir '/data/data'
Watchpack Error (initial scan): Error: EACCES: permission denied, scandir '/data'
error - ./node_modules/next/dist/client/dev/amp-dev.js
TypeError: triples is not iterable
wait - compiling...
Watchpack Error (watcher): Error: EACCES: permission denied, watch '/data/data'
Watchpack Error (watcher): Error: EACCES: permission denied, watch '/data'
Watchpack Error (initial scan): Error: EACCES: permission denied, scandir '/data/data'
Watchpack Error (initial scan): Error: EACCES: permission denied, scandir '/data'
error - ./node_modules/next/dist/client/dev/amp-dev.js
TypeError: triples is not iterable
[webpack.cache.PackFileCacheStrategy] Caching failed for pack: Error: Unable to snapshot resolve dependencies
[webpack.cache.PackFileCacheStrategy] Caching failed for pack: Error: Unable to snapshot resolve dependencies


But server is still running and when you try to open http://localhost:3000 on the browser I got this error in the browser:
Internal Server Error

and this error in error in termux:

(node:6310) [DEP_WEBPACK_MODULE_ISSUER] DeprecationWarning: Module.issuer: Use new ModuleGraph API
(Use node --trace-deprecation ... to show where the warning was created)
Watchpack Error (watcher): Error: EACCES: permission denied, watch '/data/data'
Watchpack Error (watcher): Error: EACCES: permission denied, watch '/data'
Watchpack Error (initial scan): Error: EACCES: permission denied, scandir '/data/data'
Watchpack Error (initial scan): Error: EACCES: permission denied, scandir '/data'
wait - compiling /_error...
error - ./node_modules/next/dist/client/dev/amp-dev.js
TypeError: triples is not iterable
error - Error: Cannot find module '/data/data/com.termux/files/home/next-express/.next/fallback-build-manifest.json'
Require stack:

  • /data/data/com.termux/files/home/next-express/node_modules/next/dist/server/load-components.js
  • /data/data/com.termux/files/home/next-express/node_modules/next/dist/build/utils.js
  • /data/data/com.termux/files/home/next-express/node_modules/next/dist/build/output/store.js
  • /data/data/com.termux/files/home/next-express/node_modules/next/dist/build/output/index.js
  • /data/data/com.termux/files/home/next-express/node_modules/next/dist/cli/next-dev.js
  • /data/data/com.termux/files/home/next-express/node_modules/next/dist/bin/next
    Error: Cannot find module '/data/data/com.termux/files/home/next-express/.next/fallback-build-manifest.json'
    Require stack:
  • /data/data/com.termux/files/home/next-express/node_modules/next/dist/server/load-components.js
  • /data/data/com.termux/files/home/next-express/node_modules/next/dist/build/utils.js
  • /data/data/com.termux/files/home/next-express/node_modules/next/dist/build/output/store.js
  • /data/data/com.termux/files/home/next-express/node_modules/next/dist/build/output/index.js
  • /data/data/com.termux/files/home/next-express/node_modules/next/dist/cli/next-dev.js
  • /data/data/com.termux/files/home/next-express/node_modules/next/dist/bin/next
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    at Function.mod._resolveFilename (/data/data/com.termux/files/home/next-express/node_modules/next/dist/build/webpack/require-hook.js:171:28)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.loadDefaultErrorComponents (/data/data/com.termux/files/home/next-express/node_modules/next/dist/server/load-components.js:22:24)
    at DevServer.getFallbackErrorComponents (/data/data/com.termux/files/home/next-express/node_modules/next/dist/server/dev/next-dev-server.js:673:43)
    at async DevServer.renderErrorToResponse (/data/data/com.termux/files/home/next-express/node_modules/next/dist/server/next-server.js:1730:40)
    at async pipe.req.req (/data/data/com.termux/files/home/next-express/node_modules/next/dist/server/next-server.js:1670:30)
    at async DevServer.pipe (/data/data/com.termux/files/home/next-express/node_modules/next/dist/server/next-server.js:1148:25) {
    code: 'MODULE_NOT_FOUND',
    requireStack: [
    '/data/data/com.termux/files/home/next-express/node_modules/next/dist/server/load-components.js',
    '/data/data/com.termux/files/home/next-express/node_modules/next/dist/build/utils.js',
    '/data/data/com.termux/files/home/next-express/node_modules/next/dist/build/output/store.js',
    '/data/data/com.termux/files/home/next-express/node_modules/next/dist/build/output/index.js',
    '/data/data/com.termux/files/home/next-express/node_modules/next/dist/cli/next-dev.js',
    '/data/data/com.termux/files/home/next-express/node_modules/next/dist/bin/next'
    ]
    }
    error - Error: Cannot find module '/data/data/com.termux/files/home/next-express/.next/fallback-build-manifest.json'
    Require stack:
  • /data/data/com.termux/files/home/next-express/node_modules/next/dist/server/load-components.js
  • /data/data/com.termux/files/home/next-express/node_modules/next/dist/build/utils.js
  • /data/data/com.termux/files/home/next-express/node_modules/next/dist/build/output/store.js
  • /data/data/com.termux/files/home/next-express/node_modules/next/dist/build/output/index.js
  • /data/data/com.termux/files/home/next-express/node_modules/next/dist/cli/next-dev.js
  • /data/data/com.termux/files/home/next-express/node_modules/next/dist/bin/next
    Error: Cannot find module '/data/data/com.termux/files/home/next-express/.next/fallback-build-manifest.json'
    Require stack:
  • /data/data/com.termux/files/home/next-express/node_modules/next/dist/server/load-components.js
  • /data/data/com.termux/files/home/next-express/node_modules/next/dist/build/utils.js
  • /data/data/com.termux/files/home/next-express/node_modules/next/dist/build/output/store.js
  • /data/data/com.termux/files/home/next-express/node_modules/next/dist/build/output/index.js
  • /data/data/com.termux/files/home/next-express/node_modules/next/dist/cli/next-dev.js
  • /data/data/com.termux/files/home/next-express/node_modules/next/dist/bin/next
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    at Function.mod._resolveFilename (/data/data/com.termux/files/home/next-express/node_modules/next/dist/build/webpack/require-hook.js:171:28)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.loadDefaultErrorComponents (/data/data/com.termux/files/home/next-express/node_modules/next/dist/server/load-components.js:22:24)
    at DevServer.getFallbackErrorComponents (/data/data/com.termux/files/home/next-express/node_modules/next/dist/server/dev/next-dev-server.js:673:43)
    at async DevServer.renderErrorToResponse (/data/data/com.termux/files/home/next-express/node_modules/next/dist/server/next-server.js:1730:40)
    at async pipe.req.req (/data/data/com.termux/files/home/next-express/node_modules/next/dist/server/next-server.js:1670:30)
    at async DevServer.pipe (/data/data/com.termux/files/home/next-express/node_modules/next/dist/server/next-server.js:1148:25) {
    code: 'MODULE_NOT_FOUND',
    requireStack: [
    '/data/data/com.termux/files/home/next-express/node_modules/next/dist/server/load-components.js',
    '/data/data/com.termux/files/home/next-express/node_modules/next/dist/build/utils.js',
    '/data/data/com.termux/files/home/next-express/node_modules/next/dist/build/output/store.js',
    '/data/data/com.termux/files/home/next-express/node_modules/next/dist/build/output/index.js',
    '/data/data/com.termux/files/home/next-express/node_modules/next/dist/cli/next-dev.js',
    '/data/data/com.termux/files/home/next-express/node_modules/next/dist/bin/next'
    ]
    }
    [webpack.cache.PackFileCacheStrategy] Caching failed for pack: Error: Unable to snapshot resolve dependencies
    [webpack.cache.PackFileCacheStrategy] Caching failed for pack: Error: Unable to snapshot resolve dependencies
    [webpack.cache.PackFileCacheStrategy] Caching failed for pack: Error: Unable to snapshot resolve dependencies

Also the server still running on termux

Expected Behavior

The app should work fine

To Reproduce

npm run dev

@melsiir melsiir added the bug Issue was opened via the bug report template. label Nov 28, 2021
@timneutkens timneutkens changed the title Nextjs app crash at launch because watchpack Nextjs app crash at launch because of triples Nov 29, 2021
@timneutkens
Copy link
Member

the error is actually TypeError: triples is not iterable. We'll have a look.

@timneutkens timneutkens added the SWC Related to minification/transpilation in Next.js. label Nov 29, 2021
@timneutkens timneutkens added kind: bug and removed bug Issue was opened via the bug report template. labels Nov 29, 2021
@melsiir
Copy link
Author

melsiir commented Nov 29, 2021

I am also getting this error of watcher trying to watch /data and /data/data which is root directory and I have nothing there and this is my project directory where the home/ directory is the only thing I have full access on

/data/data/com.termux/files/home/next-express

@melsiir
Copy link
Author

melsiir commented Nov 29, 2021

My device is run on armv7 could that be cause of the error triples not iterable in loader.js or it's issues from the script module it self

@padmaia
Copy link
Member

padmaia commented Nov 29, 2021

Yeah your platform looks like it is not supported by napi-rs. Once the linked PR is published in a canary, you should get a warning that a binary for SWC was not found with instructions to add a Babel config so you can build with that. We are also working on an experimental wasm build which would be another option. Also it's possible that @Brooooooklyn may end up supporting your platform in napi-rs at some point, but I don't know when or if that would happen.

@melsiir
Copy link
Author

melsiir commented Dec 2, 2021

n

Yeah your platform looks like it is not supported by napi-rs. Once the linked PR is published in a canary, you should get a warning that a binary for SWC was not found with instructions to add a Babel config so you can build with that. We are also working on an experimental wasm build which would be another option. Also it's possible that @Brooooooklyn may end up supporting your platform in napi-rs at some point, but I don't know when or if that would happen.

Hi Brooooooklyn has just add Android armv7 support to napi-rs 😃

napi-rs/napi-rs#901

@melsiir
Copy link
Author

melsiir commented Dec 2, 2021

Please make your updates

@balazsorban44
Copy link
Member

This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@vercel vercel locked as resolved and limited conversation to collaborators Jan 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
SWC Related to minification/transpilation in Next.js.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants