Title
m

michieldewilde

04/26/2018, 11:53 PM
Hello. I'm trying to deploy a typescript prisma server to now and I'm getting the following error (happens when dependencies are installed by npm, doesn't happen when they are installed with yarn.) Result of the
npm run build
command:
> rimraf dist && tsc

node_modules/@types/node/index.d.ts(2381,15): error TS2300: Duplicate identifier 'URL'.
node_modules/@types/node/index.d.ts(2399,15): error TS2300: Duplicate identifier 'URLSearchParams'.
node_modules/@types/node/index.d.ts(2417,14): error TS2661: Cannot export 'URL'. Only local declarations can be exported from a module.
node_modules/@types/node/index.d.ts(2417,19): error TS2661: Cannot export 'URLSearchParams'. Only local declarations can be exported from a module.
node_modules/typescript/lib/lib.dom.d.ts(13401,11): error TS2300: Duplicate identifier 'URL'.
node_modules/typescript/lib/lib.dom.d.ts(13417,13): error TS2300: Duplicate identifier 'URL'.
node_modules/typescript/lib/lib.dom.d.ts(13424,11): error TS2300: Duplicate identifier 'URLSearchParams'.
node_modules/typescript/lib/lib.dom.d.ts(13451,13): error TS2300: Duplicate identifier 'URLSearchParams'.
node_modules/typescript/lib/lib.dom.d.ts(15737,13): error TS2300: Duplicate identifier 'URL'.
node_modules/typescript/lib/lib.dom.d.ts(15738,13): error TS2300: Duplicate identifier 'URLSearchParams'.
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! server@0.1.0 build: `rimraf dist && tsc`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the server@0.1.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
I would be very grateful if somebody could help me with this.
n

nilan

04/27/2018, 10:03 AM
I might be missing something, but why aren't you using yarn if it works?
Also, a wild guess, can you try to remove the dependency to the node types and deploy again?