I have a fork of this lib cloned locally. I'm trying to npm link the lib as a dependency into another project. I'm getting the following Typescript compilation error:
tsc --outDir ./lib src/index.ts
node_modules/shopify-prime/dist/infrastructure/base_service.d.ts(9,130): error TS2304: Cannot find name 'Promise'.
node_modules/shopify-prime/dist/modules/auth.d.ts(11,31): error TS2304: Cannot find name 'Promise'.
node_modules/shopify-prime/dist/modules/auth.d.ts(20,31): error TS2304: Cannot find name 'Promise'.
node_modules/shopify-prime/dist/modules/auth.d.ts(30,61): error TS2304: Cannot find name 'Promise'.
node_modules/shopify-prime/dist/modules/auth.d.ts(34,70): error TS2304: Cannot find name 'Promise'.
node_modules/shopify-prime/dist/modules/auth.d.ts(43,153): error TS2304: Cannot find name 'Promise'.
node_modules/shopify-prime/dist/modules/auth.d.ts(52,119): error TS2304: Cannot find name 'Promise'.
node_modules/shopify-prime/dist/modules/charges.d.ts(12,29): error TS2304: Cannot find name 'Promise'.
node_modules/shopify-prime/dist/modules/charges.d.ts(18,46): error TS2304: Cannot find name 'Promise'.
node_modules/shopify-prime/dist/modules/charges.d.ts(23,34): error TS2304: Cannot find name 'Promise'.
node_modules/shopify-prime/dist/modules/charges.d.ts(28,27): error TS2304: Cannot find name 'Promise'.
node_modules/shopify-prime/dist/modules/recurring_charges.d.ts(13,38): error TS2304: Cannot find name 'Promise'.
node_modules/shopify-prime/dist/modules/recurring_charges.d.ts(19,46): error TS2304: Cannot find name 'Promise'.
node_modules/shopify-prime/dist/modules/recurring_charges.d.ts(24,34): error TS2304: Cannot find name 'Promise'.
node_modules/shopify-prime/dist/modules/recurring_charges.d.ts(29,27): error TS2304: Cannot find name 'Promise'.
node_modules/shopify-prime/dist/modules/recurring_charges.d.ts(34,25): error TS2304: Cannot find name 'Promise'.
node_modules/shopify-prime/dist/modules/script_tags.d.ts(13,40): error TS2304: Cannot find name 'Promise'.
node_modules/shopify-prime/dist/modules/script_tags.d.ts(18,53): error TS2304: Cannot find name 'Promise'.
node_modules/shopify-prime/dist/modules/script_tags.d.ts(23,46): error TS2304: Cannot find name 'Promise'.
node_modules/shopify-prime/dist/modules/script_tags.d.ts(27,29): error TS2304: Cannot find name 'Promise'.
node_modules/shopify-prime/dist/modules/script_tags.d.ts(32,41): error TS2304: Cannot find name 'Promise'.
node_modules/shopify-prime/dist/modules/script_tags.d.ts(36,25): error TS2304: Cannot find name 'Promise'.
node_modules/shopify-prime/dist/modules/shops.d.ts(13,34): error TS2304: Cannot find name 'Promise'.
node_modules/shopify-prime/dist/modules/shops.d.ts(17,26): error TS2304: Cannot find name 'Promise'.
node_modules/shopify-prime/dist/modules/usage_charges.d.ts(13,61): error TS2304: Cannot find name 'Promise'.
node_modules/shopify-prime/dist/modules/usage_charges.d.ts(20,73): error TS2304: Cannot find name 'Promise'.
node_modules/shopify-prime/dist/modules/usage_charges.d.ts(26,62): error TS2304: Cannot find name 'Promise'.
node_modules/shopify-prime/dist/modules/webhooks.d.ts(14,38): error TS2304: Cannot find name 'Promise'.
node_modules/shopify-prime/dist/modules/webhooks.d.ts(19,51): error TS2304: Cannot find name 'Promise'.
node_modules/shopify-prime/dist/modules/webhooks.d.ts(24,46): error TS2304: Cannot find name 'Promise'.
node_modules/shopify-prime/dist/modules/webhooks.d.ts(28,31): error TS2304: Cannot find name 'Promise'.
node_modules/shopify-prime/dist/modules/webhooks.d.ts(33,43): error TS2304: Cannot find name 'Promise'.
node_modules/shopify-prime/dist/modules/webhooks.d.ts(37,25): error TS2304: Cannot find name 'Promise'.
node_modules/shopify-prime/typings/globals/mocha/index.d.ts(5,5): error TS2300: Duplicate identifier 'slow'.
node_modules/shopify-prime/typings/globals/mocha/index.d.ts(8,5): error TS2300: Duplicate identifier 'timeout'.
node_modules/shopify-prime/typings/globals/mocha/index.d.ts(11,5): error TS2300: Duplicate identifier 'ui'.
node_modules/shopify-prime/typings/globals/mocha/index.d.ts(14,5): error TS2300: Duplicate identifier 'globals'.
node_modules/shopify-prime/typings/globals/mocha/index.d.ts(17,5): error TS2300: Duplicate identifier 'reporter'.
node_modules/shopify-prime/typings/globals/mocha/index.d.ts(20,5): error TS2300: Duplicate identifier 'bail'.
node_modules/shopify-prime/typings/globals/mocha/index.d.ts(23,5): error TS2300: Duplicate identifier 'ignoreLeaks'.
node_modules/shopify-prime/typings/globals/mocha/index.d.ts(26,5): error TS2300: Duplicate identifier 'grep'.
node_modules/shopify-prime/typings/globals/mocha/index.d.ts(96,15): error TS2300: Duplicate identifier 'Mocha'.
node_modules/shopify-prime/typings/globals/mocha/index.d.ts(141,19): error TS2300: Duplicate identifier 'Mocha'.
node_modules/shopify-prime/typings/globals/mocha/index.d.ts(236,5): error TS2300: Duplicate identifier 'export='.
node_modules/shopify-prime/typings/index.d.ts(6,1): error TS6053: File '/Users/Danijel/projects/am/am-api/node_modules/am-api/typings/modules/es6-promise/index.d.ts' not found.
node_modules/shopify-prime/typings/modules/node-fetch/index.d.ts(50,24): error TS2304: Cannot find name 'Promise'.
node_modules/shopify-prime/typings/modules/node-fetch/index.d.ts(51,17): error TS2304: Cannot find name 'Promise'.
node_modules/shopify-prime/typings/modules/node-fetch/index.d.ts(52,21): error TS2304: Cannot find name 'Promise'.
node_modules/shopify-prime/typings/modules/node-fetch/index.d.ts(53,17): error TS2304: Cannot find name 'Promise'.
node_modules/shopify-prime/typings/modules/node-fetch/index.d.ts(54,20): error TS2304: Cannot find name 'Promise'.
node_modules/shopify-prime/typings/modules/node-fetch/index.d.ts(55,17): error TS2304: Cannot find name 'Promise'.
node_modules/shopify-prime/typings/modules/node-fetch/index.d.ts(95,55): error TS2304: Cannot find name 'Promise'.
src/routes/shopify/store.ts(29,35): error TS2345: Argument of type 'string[]' is not assignable to parameter of type '("read_content" | "write_content" | "read_themes" | "write_themes" | "read_products" | "write_pro...'.
Type 'string' is not assignable to type '"read_content" | "write_content" | "read_themes" | "write_themes" | "read_products" | "write_prod...'.
Type 'string' is not assignable to type '"write_users"'.
typings/globals/mocha/index.d.ts(5,5): error TS2300: Duplicate identifier 'slow'.
typings/globals/mocha/index.d.ts(8,5): error TS2300: Duplicate identifier 'timeout'.
typings/globals/mocha/index.d.ts(11,5): error TS2300: Duplicate identifier 'ui'.
typings/globals/mocha/index.d.ts(14,5): error TS2300: Duplicate identifier 'globals'.
typings/globals/mocha/index.d.ts(17,5): error TS2300: Duplicate identifier 'reporter'.
typings/globals/mocha/index.d.ts(20,5): error TS2300: Duplicate identifier 'bail'.
typings/globals/mocha/index.d.ts(23,5): error TS2300: Duplicate identifier 'ignoreLeaks'.
typings/globals/mocha/index.d.ts(26,5): error TS2300: Duplicate identifier 'grep'.
typings/globals/mocha/index.d.ts(63,15): error TS2300: Duplicate identifier 'Mocha'.
typings/globals/mocha/index.d.ts(109,19): error TS2300: Duplicate identifier 'Mocha'.
typings/globals/mocha/index.d.ts(201,5): error TS2300: Duplicate identifier 'export='.
{
"compileOnSave": true,
"compilerOptions": {
"module": "node",
"target": "es6",
"sourceMap": true,
"removeComments": true,
"outDir": "/lib"
},
"exclude": [
"node_modules"
]
}
I'm using typescript 1.8 stable.
I assumed that by using es6 as my target, that promises would just work. Unfortunately that isn't the case. Any ideas?