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

Error: Cannot find module './playroom/snippets.js' #356

Open
Manoharvuradi opened this issue May 28, 2024 · 3 comments
Open

Error: Cannot find module './playroom/snippets.js' #356

Manoharvuradi opened this issue May 28, 2024 · 3 comments
Labels
needs reproduction This issue does not yet have a minimal reproduction

Comments

@Manoharvuradi
Copy link

After setting up the project when i run the server i got the issue.

node:internal/modules/cjs/loader:1077
const err = new Error(message);
^

Error: Cannot find module './playroom/snippets.js'
Require stack:

  • C:\Users\mahesh\Desktop\opensource\playroom\node_modules\playroom\lib\makeWebpackConfig.js
  • C:\Users\mahesh\Desktop\opensource\playroom\node_modules\playroom\lib\start.js
  • C:\Users\mahesh\Desktop\opensource\playroom\node_modules\playroom\lib\index.js
  • C:\Users\mahesh\Desktop\opensource\playroom\node_modules\playroom\bin\cli.cjs
    at Module._resolveFilename (node:internal/modules/cjs/loader:1077:15)
    at Function.resolve (node:internal/modules/cjs/helpers:127:19)
    at relativeResolve (C:\Users\mahesh\Desktop\opensource\playroom\node_modules\playroom\lib\makeWebpackConfig.js:20:13)
    at module.exports (C:\Users\mahesh\Desktop\opensource\playroom\node_modules\playroom\lib\makeWebpackConfig.js:63:13)
    at async module.exports (C:\Users\mahesh\Desktop\opensource\playroom\node_modules\playroom\lib\start.js:7:25) {
    code: 'MODULE_NOT_FOUND',
    requireStack: [
    'C:\Users\mahesh\Desktop\opensource\playroom\node_modules\playroom\lib\makeWebpackConfig.js',
    'C:\Users\mahesh\Desktop\opensource\playroom\node_modules\playroom\lib\start.js',
    'C:\Users\mahesh\Desktop\opensource\playroom\node_modules\playroom\lib\index.js',
    'C:\Users\mahesh\Desktop\opensource\playroom\node_modules\playroom\bin\cli.cjs'
    ]
    }

Node.js v18.17.1

@askoufis
Copy link
Contributor

askoufis commented May 29, 2024

@Manoharvuradi

Have you created the file at ./playroom/snippets.js? If you don't plan to use snippets, or just haven't created that file yet, you can either create it and populate it with some snippets, or remove the snippets property from your playroom config. That should make the error go away.

@askoufis askoufis added the incorrect setup Issue relating to incorrect config or setup label May 29, 2024
@Manoharvuradi
Copy link
Author

I have created ./playroom/snippets.js outside of src folder yet i'm getting the issue

node:internal/modules/cjs/loader:1077
const err = new Error(message);
^

Error: Cannot find module 'ajv/dist/compile/codegen'
Require stack:

  • C:\Users\mahesh\Desktop\opensource\playroom\node_modules\ajv-keywords\dist\definitions\typeof.js
  • C:\Users\mahesh\Desktop\opensource\playroom\node_modules\ajv-keywords\dist\keywords\typeof.js
  • C:\Users\mahesh\Desktop\opensource\playroom\node_modules\ajv-keywords\dist\keywords\index.js
  • C:\Users\mahesh\Desktop\opensource\playroom\node_modules\ajv-keywords\dist\index.js
  • C:\Users\mahesh\Desktop\opensource\playroom\node_modules\schema-utils\dist\validate.js
  • C:\Users\mahesh\Desktop\opensource\playroom\node_modules\schema-utils\dist\index.js
  • C:\Users\mahesh\Desktop\opensource\playroom\node_modules\webpack-dev-server\lib\Server.js
  • C:\Users\mahesh\Desktop\opensource\playroom\node_modules\playroom\lib\start.js
  • C:\Users\mahesh\Desktop\opensource\playroom\node_modules\playroom\lib\index.js
  • C:\Users\mahesh\Desktop\opensource\playroom\node_modules\playroom\bin\cli.cjs
    at Module._resolveFilename (node:internal/modules/cjs/loader:1077:15)
    at Module._load (node:internal/modules/cjs/loader:922:27)
    at Module.require (node:internal/modules/cjs/loader:1143:19)
    at require (node:internal/modules/cjs/helpers:121:18)
    at Object. (C:\Users\mahesh\Desktop\opensource\playroom\node_modules\ajv-keywords\dist\definitions\typeof.js:3:19)
    at Module._compile (node:internal/modules/cjs/loader:1256:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
    at Module.load (node:internal/modules/cjs/loader:1119:32)
    at Module._load (node:internal/modules/cjs/loader:960:12)
    at Module.require (node:internal/modules/cjs/loader:1143:19) {
    code: 'MODULE_NOT_FOUND',
    requireStack: [
    'C:\Users\mahesh\Desktop\opensource\playroom\node_modules\ajv-keywords\dist\definitions\typeof.js',
    'C:\Users\mahesh\Desktop\opensource\playroom\node_modules\ajv-keywords\dist\keywords\typeof.js',
    'C:\Users\mahesh\Desktop\opensource\playroom\node_modules\ajv-keywords\dist\keywords\index.js',
    'C:\Users\mahesh\Desktop\opensource\playroom\node_modules\ajv-keywords\dist\index.js',
    'C:\Users\mahesh\Desktop\opensource\playroom\node_modules\schema-utils\dist\validate.js',
    'C:\Users\mahesh\Desktop\opensource\playroom\node_modules\schema-utils\dist\index.js',
    'C:\Users\mahesh\Desktop\opensource\playroom\node_modules\webpack-dev-server\lib\Server.js',
    'C:\Users\mahesh\Desktop\opensource\playroom\node_modules\playroom\lib\start.js',
    'C:\Users\mahesh\Desktop\opensource\playroom\node_modules\playroom\lib\index.js',
    'C:\Users\mahesh\Desktop\opensource\playroom\node_modules\playroom\bin\cli.cjs'
    ]
    }

Node.js v18.17.1

@askoufis
Copy link
Contributor

askoufis commented Jun 17, 2024

@Manoharvuradi

This error doesn't look to be directly related to playroom. It could be a symptom of something else in your setup. A minimal reproduction would be much appreciated, be it a github repo or a stackblitz/codesandbox link.

@askoufis askoufis added needs reproduction This issue does not yet have a minimal reproduction and removed incorrect setup Issue relating to incorrect config or setup labels Jun 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs reproduction This issue does not yet have a minimal reproduction
Projects
None yet
Development

No branches or pull requests

2 participants