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

Unable to Deploy into production #110

Open
Sewanee-raval opened this issue Oct 14, 2024 · 1 comment
Open

Unable to Deploy into production #110

Sewanee-raval opened this issue Oct 14, 2024 · 1 comment

Comments

@Sewanee-raval
Copy link

Describe the bug
Following the Deployment instructions I issue a 'npm run build' and get the following error:

failed to load config from /opt/kener/vite.config.js
error during build:
Error [ERR_MODULE_NOT_FOUND]: Cannot find package '@sveltejs/kit' imported from /opt/kener/vite.config.js.timestamp-1728942543403-93ffb8dbf283b.mjs
    at packageResolve (node:internal/modules/esm/resolve:854:9)
    at moduleResolve (node:internal/modules/esm/resolve:927:18)
    at defaultResolve (node:internal/modules/esm/resolve:1169:11)
    at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:383:12)
    at ModuleLoader.resolve (node:internal/modules/esm/loader:352:25)
    at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:227:38)
    at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:87:39)
    at link (node:internal/modules/esm/module_job:86:36)

To Reproduce
Steps to reproduce the behavior:
Download the code from github
Follow the procedure for dev enviroment.
After testing dev, move site into production

export NODE_ENV=production
npm i
npm run build

Expected behavior
I expect that npm run build will complete and allow me to proceed to npm run serve

Screenshots
If applicable, add screenshots to help explain your problem.

Server(please complete the following information):

  • OS: Redhat Enterprise Linux 9.4
  • Browser chrome

Additional context
I have tried installing @sveltejs/kit globally 'npm install --global @sveltejs/kit' with the same failed result.

I have run the Deployment without setting NODE_ENV=production and it appears to complete the build however, once I set the NODE_ENV=production, it complains about [ERR_MODULE_NOT_FOUND]: Cannot find package '@sveltejs/kit'

@rajnandan1
Copy link
Owner

Have you tried using

npm run kener:build

and to run

npm run kener

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