Code Monkey home page Code Monkey logo

Comments (10)

jamilabreu avatar jamilabreu commented on May 22, 2024 10

@Atinux I propose considering making ./src the default folder, to bring it to parity with how vue-cli generates projects - makes for a more consistent experience imo. just a thought!

from nuxt.

Atinux avatar Atinux commented on May 22, 2024 2

I'm working on it to merge it pretty soon :)

from nuxt.

cj avatar cj commented on May 22, 2024 1

@danieloprado once the pull request is excepted you'll be able to do that. #44

from nuxt.

cj avatar cj commented on May 22, 2024

Ok, so looking through the code there is a rootDIr option. After setting that to ./src, I get the following error:

○ nuxt
  nuxt:build App root: src +0ms
  nuxt:build Generating .nuxt/ files... +2ms
  nuxt:build Generating routes... +6ms
  nuxt:build Generating files... +7ms
  nuxt:build Adding webpack middlewares... +13ms
Ready on http://localhost:3000
webpack built 6040be73cf7bdbc8b0ad in 123ms
Hash: 6040be73cf7bdbc8b0ad
Version: webpack 2.1.0-beta.27
Time: 123ms
               Asset       Size  Chunks       Chunk Names
      nuxt.bundle.js  399 bytes       0       app
    vendor.bundle.js    30.7 kB       1       vendor
  nuxt.bundle.js.map   91 bytes       0       app
vendor.bundle.js.map    32.2 kB       1       vendor

ERROR in multi vendor
Module not found: Error: Can't resolve 'vue' in '/Users/cj/Sync/apps/acd/nuxt'
 @ multi vendor

ERROR in multi vendor
Module not found: Error: Can't resolve 'vue-router' in '/Users/cj/Sync/apps/acd/nuxt'
 @ multi vendor

ERROR in multi vendor
Module not found: Error: Can't resolve 'vue-meta' in '/Users/cj/Sync/apps/acd/nuxt'
 @ multi vendor

ERROR in multi vendor
Module not found: Error: Can't resolve 'es6-promise' in '/Users/cj/Sync/apps/acd/nuxt'
 @ multi vendor

ERROR in multi vendor
Module not found: Error: Can't resolve 'es6-object-assign' in '/Users/cj/Sync/apps/acd/nuxt'
 @ multi vendor

ERROR in multi app
Module not found: Error: Can't resolve 'babel-loader' in '/Users/cj/Sync/apps/acd/nuxt'
 @ multi app

ERROR in multi app
Module not found: Error: Can't resolve 'webpack-hot-middleware/client?reload=true' in '/Users/cj/Sync/apps/acd/nuxt'
 @ multi app
Entry module not found: Error: Can't resolve 'babel-loader' in '/Users/cj/Sync/apps/acd/nuxt'
resolve 'babel-loader' in '/Users/cj/Sync/apps/acd/nuxt'
  Parsed request is a module
  using description file: /Users/cj/Sync/apps/acd/nuxt/package.json (relative path: .)
  after using description file: /Users/cj/Sync/apps/acd/nuxt/package.json (relative path: .)
    resolve as module
      /Users/cj/Sync/apps/acd/nuxt/src/node_modules doesn't exist or is not a directory
      /Users/cj/Sync/apps/src/node_modules doesn't exist or is not a directory
      /Users/cj/Sync/apps/acd/src/node_modules doesn't exist or is not a directory
      /Users/cj/Sync/src/node_modules doesn't exist or is not a directory
      /Users/cj/src/node_modules doesn't exist or is not a directory
      /Users/src/node_modules doesn't exist or is not a directory
      /src/node_modules doesn't exist or is not a directory
      looking for modules in /Users/cj/Sync/apps/acd/nuxt/node_modules/nuxt/node_modules
        using description file: /Users/cj/Sync/apps/acd/nuxt/node_modules/nuxt/package.json (relative path: ./node_modules)
        after using description file: /Users/cj/Sync/apps/acd/nuxt/node_modules/nuxt/package.json (relative path: ./node_modules)
          using description file: /Users/cj/Sync/apps/acd/nuxt/node_modules/nuxt/package.json (relative path: ./node_modules/babel-loader)
            as directory
              /Users/cj/Sync/apps/acd/nuxt/node_modules/nuxt/node_modules/babel-loader doesn't exist
            no extension
              /Users/cj/Sync/apps/acd/nuxt/node_modules/nuxt/node_modules/babel-loader doesn't exist
            .js
              /Users/cj/Sync/apps/acd/nuxt/node_modules/nuxt/node_modules/babel-loader.js doesn't exist
            .json
              /Users/cj/Sync/apps/acd/nuxt/node_modules/nuxt/node_modules/babel-loader.json doesn't exist

/Users/cj/Sync/apps/acd/nuxt/node_modules/memory-fs/lib/MemoryFileSystem.js:114
                        throw new MemoryFileSystemError(errors.code.ENOENT, _path);
                        ^
Error: no such file or directory
    at MemoryFileSystem.readFileSync (/Users/cj/Sync/apps/acd/nuxt/node_modules/memory-fs/lib/MemoryFileSystem.js:114:10)
    at Watching.webpackServerWatcher.serverCompiler.watch [as handler] (/Users/cj/Sync/apps/acd/nuxt/node_modules/nuxt/lib/build/index.js:268:35)
    at Watching._done (/Users/cj/Sync/apps/acd/nuxt/node_modules/webpack/lib/Compiler.js:96:7)
    at /Users/cj/Sync/apps/acd/nuxt/node_modules/webpack/lib/Compiler.js:76:18
    at Compiler.emitRecords (/Users/cj/Sync/apps/acd/nuxt/node_modules/webpack/lib/Compiler.js:350:37)
    at /Users/cj/Sync/apps/acd/nuxt/node_modules/webpack/lib/Compiler.js:59:19
    at /Users/cj/Sync/apps/acd/nuxt/node_modules/webpack/lib/Compiler.js:343:11
    at Compiler.applyPluginsAsyncSeries (/Users/cj/Sync/apps/acd/nuxt/node_modules/tapable/lib/Tapable.js:95:46)
    at Compiler.afterEmit (/Users/cj/Sync/apps/acd/nuxt/node_modules/webpack/lib/Compiler.js:340:8)
    at Compiler.<anonymous> (/Users/cj/Sync/apps/acd/nuxt/node_modules/webpack/lib/Compiler.js:335:14)

from nuxt.

cj avatar cj commented on May 22, 2024

I'm trying to end up with this structure:


from nuxt.

cj avatar cj commented on May 22, 2024

looks like there needs to be a srcDir option. going to fork and add one.

from nuxt.

Atinux avatar Atinux commented on May 22, 2024

Hi @cj, why do you want to have this structure?

You need to have the node_modules/ and the nuxt.config.js in the src/ folder to make it work.

from nuxt.

danieloprado avatar danieloprado commented on May 22, 2024

I´m looking for same option, I would like to move all file to a app folder to separate my server/api files, a rootDir option would be great!

app
|--components
|--pages
|--static
server
|--main.js
|--etc..

from nuxt.

Atinux avatar Atinux commented on May 22, 2024

You can now use the v0.8.4 🎊

from nuxt.

lock avatar lock commented on May 22, 2024

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.

from nuxt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.