image icon indicating copy to clipboard operation
image copied to clipboard

[error] Cannot find package 'ipx' imported from /root/codingci/tools/jenkins_home/workspace/3498475-cci-36798128-466650/.nuxt/prerender/index.mjs

Open CallBoson opened this issue 2 years ago • 1 comments

Body: Hello,

I've encountered an issue with the @nuxt/image package (v1.1.0) in my project. Initially, I installed this version locally under "dependencies." However, during runtime and when using the generate command, I faced an error. To resolve this, I moved the package to "devDependencies" and switched to a release candidate version, which allowed for normal local operation and generation.

The problem reappeared when deploying to the server. As a workaround, I downgraded to version 1.0.0, and the server build was successful. Surprisingly, when I tried to rebuild the same version on the server the next day, the error occurred again.

Could you please shed some light on why this inconsistency is happening? Also, I would appreciate any suggestions on how to resolve this issue.

Details for reference:

Node version: 18.12.1 Nuxt version: ^3.8.1

Log of the shell:

[2023-12-01 11:19:02] [success] Server built in 2469ms
[2023-12-01 11:19:02] [info] [nitro] Initializing prerenderer
[2023-12-01 11:19:03] [warn] "ipx" is imported by "node_modules/@nuxt/image/dist/runtime/ipx.mjs", but could not be resolved – treating it as an external dependency.
[2023-12-01 11:19:03] [error] Cannot find package 'ipx' imported from /root/codingci/tools/jenkins_home/workspace/3498475-cci-36798128-466650/.nuxt/prerender/index.mjs
[2023-12-01 11:19:03]   at new NodeError (node:internal/errors:393:5)
[2023-12-01 11:19:03]   at packageResolve (node:internal/modules/esm/resolve:860:9)
[2023-12-01 11:19:03]   at moduleResolve (node:internal/modules/esm/resolve:909:20)
[2023-12-01 11:19:03]   at defaultResolve (node:internal/modules/esm/resolve:1124:11)
[2023-12-01 11:19:03]   at nextResolve (node:internal/modules/esm/loader:163:28)
[2023-12-01 11:19:03]   at ESMLoader.resolve (node:internal/modules/esm/loader:841:30)
[2023-12-01 11:19:03]   at ESMLoader.getModuleJob (node:internal/modules/esm/loader:424:18)
[2023-12-01 11:19:03]   at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:76:40)
[2023-12-01 11:19:03]   at link (node:internal/modules/esm/module_job:75:36) 
[2023-12-01 11:19:03] 
[2023-12-01 11:19:03] [error] Cannot find package 'ipx' imported from /root/codingci/tools/jenkins_home/workspace/3498475-cci-36798128-466650/.nuxt/prerender/index.mjs

Thank you for your assistance.

CallBoson avatar Dec 01 '23 03:12 CallBoson

Same, just randomly started happening to me on same versions, downgraded to 3.8.0 nuxt and 1.0.0 img didnt fix it for me either.

surgiie avatar Jan 17 '24 15:01 surgiie