-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
Description / Steps to reproduce / Feature proposal
Clone the loopback-next Git repository; cd to examples/todo-list; npm start -> transpilation errors in several .ts files
node: 10.0.0
npm: 6.4.1
tsc: 3.1.1
OS: Ubuntu 16.04LTS
Current Behavior
alain@aegnor:~/devel/thirdparty-use$ git clone https://github.com/strongloop/loopback-next.git
Cloning into 'loopback-next'...
remote: Enumerating objects: 70, done.
remote: Counting objects: 100% (70/70), done.
remote: Compressing objects: 100% (50/50), done.
remote: Total 24569 (delta 37), reused 37 (delta 20), pack-reused 24499
Receiving objects: 100% (24569/24569), 8.64 MiB | 6.11 MiB/s, done.
Resolving deltas: 100% (18223/18223), done.
Checking connectivity... done.
alain@aegnor:~/devel/thirdparty-use$ cd loopback-next/
alain@aegnor:~/devel/thirdparty-use/loopback-next$ ls -ltr
total 72
-rw-rw-r-- 1 alain alain 5265 oct 3 18:55 README.md
-rw-rw-r-- 1 alain alain 1195 oct 3 18:55 LICENSE
-rw-rw-r-- 1 alain alain 1141 oct 3 18:55 CODEOWNERS
-rw-rw-r-- 1 alain alain 122 oct 3 18:55 CHANGELOG.md
-rw-rw-r-- 1 alain alain 308 oct 3 18:55 appveyor.yml
-rw-rw-r-- 1 alain alain 554 oct 3 18:55 commitlint.config.js
drwxrwxr-x 2 alain alain 4096 oct 3 18:55 bin
drwxrwxr-x 4 alain alain 4096 oct 3 18:55 benchmark
drwxrwxr-x 4 alain alain 4096 oct 3 18:55 docs
drwxrwxr-x 8 alain alain 4096 oct 3 18:55 examples
-rw-rw-r-- 1 alain alain 2729 oct 3 18:55 package.json
-rw-rw-r-- 1 alain alain 648 oct 3 18:55 lerna.json
-rw-rw-r-- 1 alain alain 257 oct 3 18:55 tslint.json
-rw-rw-r-- 1 alain alain 256 oct 3 18:55 tslint.build.json
-rw-rw-r-- 1 alain alain 292 oct 3 18:55 tsconfig.json
drwxrwxr-x 3 alain alain 4096 oct 3 18:55 sandbox
drwxrwxr-x 20 alain alain 4096 oct 3 18:55 packages
alain@aegnor:~/devel/thirdparty-use/loopback-next$ cd examples/
alain@aegnor:~/devel/thirdparty-use/loopback-next/examples$ ls -ltr
total 24
drwxrwxr-x 5 alain alain 4096 oct 3 18:55 hello-world
drwxrwxr-x 7 alain alain 4096 oct 3 18:55 todo-list
drwxrwxr-x 5 alain alain 4096 oct 3 18:55 soap-calculator
drwxrwxr-x 5 alain alain 4096 oct 3 18:55 rpc-server
drwxrwxr-x 5 alain alain 4096 oct 3 18:55 log-extension
drwxrwxr-x 6 alain alain 4096 oct 3 18:55 todo
alain@aegnor:~/devel/thirdparty-use/loopback-next/examples$ cd todo-list/
alain@aegnor:~/devel/thirdparty-use/loopback-next/examples/todo-list$ ls -ltr
total 60
-rw-rw-r-- 1 alain alain 129 oct 3 18:55 tslint.json
-rw-rw-r-- 1 alain alain 128 oct 3 18:55 tslint.build.json
-rw-rw-r-- 1 alain alain 220 oct 3 18:55 tsconfig.build.json
drwxrwxr-x 4 alain alain 4096 oct 3 18:55 test
drwxrwxr-x 6 alain alain 4096 oct 3 18:55 src
-rw-rw-r-- 1 alain alain 3356 oct 3 18:55 README.md
-rw-rw-r-- 1 alain alain 2161 oct 3 18:55 package.json
-rw-rw-r-- 1 alain alain 1204 oct 3 18:55 LICENSE
-rw-rw-r-- 1 alain alain 315 oct 3 18:55 index.ts
-rw-rw-r-- 1 alain alain 490 oct 3 18:55 index.js
-rw-rw-r-- 1 alain alain 233 oct 3 18:55 index.d.ts
drwxrwxr-x 2 alain alain 4096 oct 3 18:55 imgs
drwxrwxr-x 2 alain alain 4096 oct 3 18:55 data
-rw-rw-r-- 1 alain alain 5524 oct 3 18:55 CHANGELOG.md
alain@aegnor:~/devel/thirdparty-use/loopback-next/examples/todo-list$ npm install
npm WARN deprecated [email protected]: no longer maintained
added 624 packages from 1417 contributors and audited 3141 packages in 10.386s
found 1 low severity vulnerability
run npm audit fix to fix them, or npm audit for details
alain@aegnor:~/devel/thirdparty-use/loopback-next/examples/todo-list$ npm start
@loopback/[email protected] prestart /media/elrond_2tb/devel/thirdparty-use/loopback-next/examples/todo-list
npm run build
@loopback/[email protected] build /media/elrond_2tb/devel/thirdparty-use/loopback-next/examples/todo-list
lb-tsc
src/models/todo-list.model.ts:28:12 - error TS2345: Argument of type '() => typeof Todo' is not assignable to parameter of type 'typeof Entity'.
Property 'getIdOf' is missing in type '() => typeof Todo'.
28 @hasmany(() => Todo)
~~~~~~~~~~
src/models/todo-list.model.ts:28:12
28 @hasmany(() => Todo)
~~~~~~~~~~
Did you mean to call this expression?
src/repositories/todo-list.repository.ts:24:17 - error TS2339: Property 'getter' does not exist on type '{ (repositoryName: string | Class<Repository>): RepositoryDecorator; (model: string | typeof Entity, dataSource: string | DataSource): RepositoryDecorator; }'.
24 @repository.getter(TodoRepository)
~~~~~~
src/repositories/todo-list.repository.ts:30:7 - error TS2345: Argument of type 'Getter' is not assignable to parameter of type 'EntityCrudRepository<Todo, {}>'.
Property 'save' is missing in type 'Getter'.
30 todoRepositoryGetter,
~~~~~~~~~~~~~~~~~~~~
test/unit/controllers/todo-list-todo.controller.unit.ts:11:3 - error TS2305: Module '"/media/elrond_2tb/devel/thirdparty-use/loopback-next/examples/todo-list/node_modules/@loopback/testlab/index"' has no exported member 'createStubInstance'.
11 createStubInstance,
~~~~~~~~~~~~~~~~~~
test/unit/controllers/todo-list-todo.controller.unit.ts:14:3 - error TS2305: Module '"/media/elrond_2tb/devel/thirdparty-use/loopback-next/examples/todo-list/node_modules/@loopback/testlab/index"' has no exported member 'StubbedInstanceWithSinonAccessor'.
14 StubbedInstanceWithSinonAccessor,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
test/unit/controllers/todo-list.controller.unit.ts:7:3 - error TS2305: Module '"/media/elrond_2tb/devel/thirdparty-use/loopback-next/examples/todo-list/node_modules/@loopback/testlab/index"' has no exported member 'createStubInstance'.
7 createStubInstance,
~~~~~~~~~~~~~~~~~~
test/unit/controllers/todo-list.controller.unit.ts:10:3 - error TS2305: Module '"/media/elrond_2tb/devel/thirdparty-use/loopback-next/examples/todo-list/node_modules/@loopback/testlab/index"' has no exported member 'StubbedInstanceWithSinonAccessor'.
10 StubbedInstanceWithSinonAccessor,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
test/unit/controllers/todo.controller.unit.ts:7:3 - error TS2305: Module '"/media/elrond_2tb/devel/thirdparty-use/loopback-next/examples/todo-list/node_modules/@loopback/testlab/index"' has no exported member 'createStubInstance'.
7 createStubInstance,
~~~~~~~~~~~~~~~~~~
test/unit/controllers/todo.controller.unit.ts:10:3 - error TS2305: Module '"/media/elrond_2tb/devel/thirdparty-use/loopback-next/examples/todo-list/node_modules/@loopback/testlab/index"' has no exported member 'StubbedInstanceWithSinonAccessor'.
10 StubbedInstanceWithSinonAccessor,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! @loopback/[email protected] build: lb-tsc
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the @loopback/[email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/alain/.npm/_logs/2018-10-03T16_56_25_596Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! @loopback/[email protected] prestart: npm run build
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the @loopback/[email protected] prestart script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/alain/.npm/_logs/2018-10-03T16_56_25_621Z-debug.log
alain@aegnor:~/devel/thirdparty-use/loopback-next/examples/todo-list$
alain@aegnor:~/devel/thirdparty-use/loopback-next/examples/todo-list$ rm -rf node_modules/
alain@aegnor:~/devel/thirdparty-use/loopback-next/examples/todo-list$ npm install
npm WARN deprecated [email protected]: no longer maintained
added 624 packages from 1417 contributors and audited 3141 packages in 7.453s
found 1 low severity vulnerability
run npm audit fix to fix them, or npm audit for details
alain@aegnor:~/devel/thirdparty-use/loopback-next/examples/todo-list$ npm audit fix
npm ERR! code EAUDITNOLOCK
npm ERR! audit Neither npm-shrinkwrap.json nor package-lock.json found: Cannot audit a project without a lockfile
npm ERR! audit Try creating one first with: npm i --package-lock-only
npm ERR! A complete log of this run can be found in:
npm ERR! /home/alain/.npm/_logs/2018-10-03T16_57_05_101Z-debug.log
alain@aegnor:~/devel/thirdparty-use/loopback-next/examples/todo-list$ npm i --package-lock-only
audited 3141 packages in 2.929s
found 1 low severity vulnerability
run npm audit fix to fix them, or npm audit for details
alain@aegnor:~/devel/thirdparty-use/loopback-next/examples/todo-list$ npm start
@loopback/[email protected] prestart /media/elrond_2tb/devel/thirdparty-use/loopback-next/examples/todo-list
npm run build
@loopback/[email protected] build /media/elrond_2tb/devel/thirdparty-use/loopback-next/examples/todo-list
lb-tsc
src/models/todo-list.model.ts:28:12 - error TS2345: Argument of type '() => typeof Todo' is not assignable to parameter of type 'typeof Entity'.
Property 'getIdOf' is missing in type '() => typeof Todo'.
28 @hasmany(() => Todo)
~~~~~~~~~~
src/models/todo-list.model.ts:28:12
28 @hasmany(() => Todo)
~~~~~~~~~~
Did you mean to call this expression?
src/repositories/todo-list.repository.ts:24:17 - error TS2339: Property 'getter' does not exist on type '{ (repositoryName: string | Class<Repository>): RepositoryDecorator; (model: string | typeof Entity, dataSource: string | DataSource): RepositoryDecorator; }'.
24 @repository.getter(TodoRepository)
~~~~~~
src/repositories/todo-list.repository.ts:30:7 - error TS2345: Argument of type 'Getter' is not assignable to parameter of type 'EntityCrudRepository<Todo, {}>'.
Property 'save' is missing in type 'Getter'.
30 todoRepositoryGetter,
~~~~~~~~~~~~~~~~~~~~
test/unit/controllers/todo-list-todo.controller.unit.ts:11:3 - error TS2305: Module '"/media/elrond_2tb/devel/thirdparty-use/loopback-next/examples/todo-list/node_modules/@loopback/testlab/index"' has no exported member 'createStubInstance'.
11 createStubInstance,
~~~~~~~~~~~~~~~~~~
test/unit/controllers/todo-list-todo.controller.unit.ts:14:3 - error TS2305: Module '"/media/elrond_2tb/devel/thirdparty-use/loopback-next/examples/todo-list/node_modules/@loopback/testlab/index"' has no exported member 'StubbedInstanceWithSinonAccessor'.
14 StubbedInstanceWithSinonAccessor,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
test/unit/controllers/todo-list.controller.unit.ts:7:3 - error TS2305: Module '"/media/elrond_2tb/devel/thirdparty-use/loopback-next/examples/todo-list/node_modules/@loopback/testlab/index"' has no exported member 'createStubInstance'.
7 createStubInstance,
~~~~~~~~~~~~~~~~~~
test/unit/controllers/todo-list.controller.unit.ts:10:3 - error TS2305: Module '"/media/elrond_2tb/devel/thirdparty-use/loopback-next/examples/todo-list/node_modules/@loopback/testlab/index"' has no exported member 'StubbedInstanceWithSinonAccessor'.
10 StubbedInstanceWithSinonAccessor,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
test/unit/controllers/todo.controller.unit.ts:7:3 - error TS2305: Module '"/media/elrond_2tb/devel/thirdparty-use/loopback-next/examples/todo-list/node_modules/@loopback/testlab/index"' has no exported member 'createStubInstance'.
7 createStubInstance,
~~~~~~~~~~~~~~~~~~
test/unit/controllers/todo.controller.unit.ts:10:3 - error TS2305: Module '"/media/elrond_2tb/devel/thirdparty-use/loopback-next/examples/todo-list/node_modules/@loopback/testlab/index"' has no exported member 'StubbedInstanceWithSinonAccessor'.
10 StubbedInstanceWithSinonAccessor,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! @loopback/[email protected] build: lb-tsc
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the @loopback/[email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/alain/.npm/_logs/2018-10-03T16_57_36_626Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! @loopback/[email protected] prestart: npm run build
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the @loopback/[email protected] prestart script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/alain/.npm/_logs/2018-10-03T16_57_36_652Z-debug.log
Expected Behavior
A correct build and run