Skip to content

Build and start don't work #6

@vincentwinkel

Description

@vincentwinkel

The dev mode works well, however not the build process.

npm install

Install ok.

npm run build

Error:

src/utils/services/loadFixtures.service.ts:65:9 - error TS2740: Type 'Tag[]' is missing the following properties from type 'Collection<Tag, unknown>': snapshot, dirty, _populated, _lazyInitialized, and 42 more.

65         book.tags = [orm.em.getRepository(Tag).getReference(tags[bookIndex].id)];
           ~~~~~~~~~

I comment this line. Build ok.

npm run start

Error:

> cross-env NODE_PATH=./dist/src node dist/src/index.js

node_modules/globby/index.js:28
	} catch {
	        ^

SyntaxError: Unexpected token {
    at createScript (vm.js:80:10)
    at Object.runInThisContext (vm.js:139:10)
    at Module._compile (module.js:616:28)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (node_modules/@mikro-orm/core/cache/FileCacheAdapter.js:7:34)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions