Nuxt.js: Command `generate` fails

Created on 27 Jul 2017  路  2Comments  路  Source: nuxt/nuxt.js

On a fresh install, running these commands fails:

vue init nuxt/starter test
cd test
npm install
npm run generate

The npm run generate command displays:

> [email protected] generate /xxx/nuxt/test
> nuxt generate

  nuxt:generate Generating... +0ms
  nuxt:build App root: /xxx/nuxt/my-project2 +17ms
  nuxt:build Generating /xxx/nuxt/my-project2/.nuxt files... +0ms
  nuxt:build Generating files... +11ms
  nuxt:build Generating routes... +6ms
  nuxt:build Building files... +22ms
  build [==================  ] 91%Hash: c110b22c9c3c8c39ad20
Version: webpack 3.4.1
Time: 8837ms
             Asset    Size  Chunks             Chunk Names
server-bundle.json  227 kB          [emitted]

ERROR in ./node_modules/nuxt/node_modules/babel-loader/lib?{"presets":["vue-app"],"babelrc":false,"cacheDirectory":false}!./node_modules/nuxt/node_modules/vue-loader/lib/selector.js?type=script&index=0!./pages/index.vue
Module not found: Error: Can't resolve '~components/Logo.vue' in '/xxx/nuxt/my-project2/pages'
 @ ./node_modules/nuxt/node_modules/babel-loader/lib?{"presets":["vue-app"],"babelrc":false,"cacheDirectory":false}!./node_modules/nuxt/node_modules/vue-loader/lib/selector.js?type=script&index=0!./pages/index.vue 20:0-40
 @ ./pages/index.vue
 @ ./.nuxt/router.js
 @ ./.nuxt/index.js
 @ ./.nuxt/server.js

I don't know why, maybe it's not related to this package, and maybe I have done something wrong.

Most helpful comment

Hi. Please change all ~components to ~/components aliases. Sorry for the lack of release notes.

All 2 comments

Hi. Please change all ~components to ~/components aliases. Sorry for the lack of release notes.

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

uptownhr picture uptownhr  路  3Comments

VincentLoy picture VincentLoy  路  3Comments

gary149 picture gary149  路  3Comments

msudgh picture msudgh  路  3Comments

o-alexandrov picture o-alexandrov  路  3Comments