Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add 'remove clasp' in setup instructions
Not removing the current version of `clasp` can break `node_module` dependencies. It's better to start with a clean version of clasp. Here's my history: ``` sudo npm run build; > @google/[email protected] build /Users/timmerman/Documents/github/google/clasp > tsc --project tsconfig.json; npm i -g; index.ts(200,17): error TS7006: Parameter 'answers' implicitly has an 'any' type. index.ts(202,17): error TS7006: Parameter 'err' implicitly has an 'any' type. index.ts(297,17): error TS7034: Variable 'fileIds' implicitly has type 'any[]' in some locations where its type cannot be determined. index.ts(300,15): error TS7005: Variable 'fileIds' implicitly has an 'any[]' type. index.ts(306,25): error TS7005: Variable 'fileIds' implicitly has an 'any[]' type. index.ts(307,23): error TS7006: Parameter 'answers' implicitly has an 'any' type. index.ts(312,23): error TS7006: Parameter 'err' implicitly has an 'any' type. index.ts(714,25): error TS7017: Element implicitly has an 'any' type because type '{ textPayload: any; jsonPayload: any; protoPayload: any; }' has no index signature. index.ts(720,31): error TS7017: Element implicitly has an 'any' type because type '{ ERROR: any; INFO: any; DEBUG: any; NOTICE: any; }' has no index signature. index.ts(745,55): error TS7006: Parameter 'err' implicitly has an 'any' type. index.ts(762,12): error TS7006: Parameter 'functionName' implicitly has an 'any' type. src/auth.ts(63,55): error TS2339: Property 'port' does not exist on type 'string | AddressInfo'. Property 'port' does not exist on type 'string'. npm ERR! path /usr/local/lib/node_modules/.staging/@google/clasp-e2305ebe/node_modules/@google-cloud/common npm ERR! code ENOENT npm ERR! errno -2 npm ERR! syscall rename npm ERR! enoent ENOENT: no such file or directory, rename '/usr/local/lib/node_modules/.staging/@google/clasp-e2305ebe/node_modules/@google-cloud/common' -> '/usr/local/lib/node_modules/.staging/@google-cloud/common-0995f8ca' npm ERR! enoent This is related to npm not being able to find a file. npm ERR! enoent npm ERR! A complete log of this run can be found in: npm ERR! /var/root/.npm/_logs/2018-05-25T16_33_27_616Z-debug.log npm ERR! code ELIFECYCLE npm ERR! errno 254 npm ERR! @google/[email protected] build: `tsc --project tsconfig.json; npm i -g;` npm ERR! Exit status 254 npm ERR! npm ERR! Failed at the @google/[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! /var/root/.npm/_logs/2018-05-25T16_33_27_662Z-debug.log ``` ``` sudo npm uninstall -g @google/clasp removed 594 packages in 5.063s ``` ``` sudo npm run build; > @google/[email protected] build /Users/timmerman/Documents/github/google/clasp > tsc --project tsconfig.json; npm i -g; index.ts(200,17): error TS7006: Parameter 'answers' implicitly has an 'any' type. index.ts(202,17): error TS7006: Parameter 'err' implicitly has an 'any' type. index.ts(297,17): error TS7034: Variable 'fileIds' implicitly has type 'any[]' in some locations where its type cannot be determined. index.ts(300,15): error TS7005: Variable 'fileIds' implicitly has an 'any[]' type. index.ts(306,25): error TS7005: Variable 'fileIds' implicitly has an 'any[]' type. index.ts(307,23): error TS7006: Parameter 'answers' implicitly has an 'any' type. index.ts(312,23): error TS7006: Parameter 'err' implicitly has an 'any' type. index.ts(714,25): error TS7017: Element implicitly has an 'any' type because type '{ textPayload: any; jsonPayload: any; protoPayload: any; }' has no index signature. index.ts(720,31): error TS7017: Element implicitly has an 'any' type because type '{ ERROR: any; INFO: any; DEBUG: any; NOTICE: any; }' has no index signature. index.ts(745,55): error TS7006: Parameter 'err' implicitly has an 'any' type. index.ts(762,12): error TS7006: Parameter 'functionName' implicitly has an 'any' type. src/auth.ts(63,55): error TS2339: Property 'port' does not exist on type 'string | AddressInfo'. Property 'port' does not exist on type 'string'. /usr/local/bin/clasp -> /usr/local/lib/node_modules/@google/clasp/index.js + @google/[email protected] added 1 package from 1 contributor in 2.725s ``` Observe clasp builds successfully without `npm ERR!`.
- Loading branch information
7f35583
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hopefully this help will stop build errors.
I also had to
sudo rm -rf node_modules/
.FYI @campionfellin.