Nuxt.js: [edge] nuxt doesnt launch if only production dependencies installed

Created on 9 May 2018  路  7Comments  路  Source: nuxt/nuxt.js

Version

v1.4.0

Reproduction link

none

Steps to reproduce

yarn install --production=true
yarn start

It will fail with following error:

$ nuxt start
internal/modules/cjs/loader.js:573
    throw err;
    ^

Error: Cannot find module 'figures'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:571:15)
    at Function.Module._load (internal/modules/cjs/loader.js:497:25)
    at Module.require (internal/modules/cjs/loader.js:626:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (C:\Dev\PycharmProjects\rasimplefront\t\node_modules\nuxt-edge\dist\nuxt.js:10:31)
    at Module._compile (internal/modules/cjs/loader.js:678:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:689:10)
    at Module.load (internal/modules/cjs/loader.js:589:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:528:12)
    at Function.Module._load (internal/modules/cjs/loader.js:520:3)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Maybe there will be other modules if this one is added

What is expected ?

no import error

What is actually happening?

import error with module figures

This bug report is available on Nuxt.js community (#c7043)
bug-report

Most helpful comment

It really matters for production deployments. For example with serverless lambda deployment only production packages uploaded to lambda, so it will lead to error, unless figures manually added to project dependencies.

All 7 comments

It really matters for production deployments. For example with serverless lambda deployment only production packages uploaded to lambda, so it will lead to error, unless figures manually added to project dependencies.

@aldarund Have you tried nuxt-edge ?
figures should be a nested dependency in nuxt now.

@clarkdo as u see in the title it was for edge at the moment of writing. I`l trying again with latest build shortly to see if it persist or no

@clarkdo tried now. It work now fine. Because right now there no import of figures at all in dist/nuxt.js. While in older build there was and it was causing this. I even have a copy of old one and here how it was looking dist/nuxt.js . Left one old edge build rigth recent edge build
https://i.imgur.com/lvHEZhS.png

Can this be closed?

ye, sure

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nassimbenkirane picture nassimbenkirane  路  3Comments

pehbehbeh picture pehbehbeh  路  3Comments

mattdharmon picture mattdharmon  路  3Comments

bimohxh picture bimohxh  路  3Comments

shyamchandranmec picture shyamchandranmec  路  3Comments