Being able to run clasp
Gets an error message on any execution of the clasp command
1) Installing clasp like instructed
2) Running "clasp" or "clasp login" results in the following:
...AppData\Roaming\npm\node_modules\@google\clasp\src\dotfile.js:89
RC: dotf(exports.DOT.RC.DIR, exports.DOT.RC.NAME),
^
TypeError: dotf is not a function
node -v):clasp -v):@robfordww there is an issue with the dotf package
A PR to fix it has been produced, for @grant to review and re-publish.
Meanwhile, the workaround is to edit Clasp package.json so that it does not use [email protected]
"dotf": "~1.2.0",
confirmed, facing similar issue but my config is already set to use ~1.2.0 version.
@robfordww @darul75 (and others) be sure to issue a ~npm install~ after patching dotf version to ~1.2.0
On my system at least, this fixed the issue.
I am on a mac and it does not make any differences, I have tried to uninstall it globally and install a previous release but I still got this error.
"dependencies": {
"chalk": "^2.4.1",
"cli-spinner": "^0.2.8",
"commander": "^2.15.1",
"connect": "^3.6.6",
"del": "^3.0.0",
"dotf": "^1.2.0",
/usr/local/lib/node_modules/@google/clasp/src/dotfile.js:89
RC: dotf(exports.DOT.RC.DIR, exports.DOT.RC.NAME),
^
TypeError: dotf is not a function
at Object.
at Module._compile (internal/modules/cjs/loader.js:701:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
at Module.load (internal/modules/cjs/loader.js:600:32)
at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
at Function.Module._load (internal/modules/cjs/loader.js:531:3)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
at Object.
at Module._compile (internal/modules/cjs/loader.js:701:30)
@darul75 (and others) for a correct workaround:
package.json with "~1.2.0" for "dotf" versionnpm uninstall -g @google/clasp && npm run build-fresh (your system may require you to sudo that command)clasp --version to verify clasp no longer crashesok, thanks my bad, I confused ^1.2.0 with ~1.2.0 your initial @PopGoesTheWza workaround worked.
Looks like a PR to dotf broke the module.
[email protected][email protected] with a patch by Pop.Update:
I'm still seeing multiple reports for clasp being broken.
Working on a fix.
@PopGoesTheWza Thank you for the work around!
Hi all,
I believe I've successfully deprecated the broken dotf versions on npm.
If you installed clasp between now and yesterday, you may have installed a version that includes the broken dotf package. Please re-install clasp to undo that.
https://www.npmjs.com/package/dotf/v/1.2.0 – Latest/Working (published 6 months ago)
https://www.npmjs.com/package/dotf/v/1.3.0 – Broken (unpublished)
https://www.npmjs.com/package/dotf/v/1.4.0 – Broken attempt to fix (unpublished)
As a result, I believe clasp will use [email protected] as the latest.
Before:
sudo npm i @google/clasp -g
npm WARN deprecated [email protected]: Issue: https://github.com/grant/dotf/issues/10
After:
sudo npm i @google/clasp -g
+ @google/[email protected]
@grant This appears to have popped up again. When installing on a fresh system today, I got nailed with this one. It was trying to use https://www.npmjs.com/package/dotf/v/1.4.1
The same workaround above works for pinning to ~1.2.0.
You can also install via your project's package.json and run using npx clasp.
"devDependencies": {
"@google/clasp": "^2.2.0",
"dotf": "~1.2.0"
}
@dermidgen PR #739 is successful in build & test with [email protected]
Can you give more details about reproducing the issue?
@PopGoesTheWza
Ubuntu 18.04.4 LTS
Node v12.8.0
NVM v0.32.1
node_modulesnpm i -g @google/claspclasp (also ran ./src/index.js from ~/.nvm/versions/node/v12.8.0/lib/node_modules/@google/clasp for same result)~/.nvm/versions/node/v12.8.0/lib/node_modules/@google/clasp/src/dotfile.js:112
RC: dotf(exports.DOT.RC.DIR, exports.DOT.RC.NAME),
^
TypeError: dotf is not a function
at Object.<anonymous> (~/.nvm/versions/node/v12.8.0/lib/node_modules/@google/clasp/src/dotfile.js:112:9)
at Module._compile (internal/modules/cjs/loader.js:868:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:879:10)
at Module.load (internal/modules/cjs/loader.js:731:32)
at Function.Module._load (internal/modules/cjs/loader.js:644:12)
at Module.require (internal/modules/cjs/loader.js:771:19)
at require (internal/modules/cjs/helpers.js:68:18)
at Object.<anonymous> (~/.nvm/versions/node/v12.8.0/lib/node_modules/@google/clasp/src/utils.js:58:17)
at Module._compile (internal/modules/cjs/loader.js:868:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:879:10)
Also tried by using local package overrides and npx. For the same result. Any dotf > @1.2.0 is borked for me.
@dermidgen : I just released [email protected] which should address this issue
@PopGoesTheWza you nailed it. Thanks for the amazing turn-around on that! Wowza! :heart_eyes:
@dermidgen thanks for pointing out this (silly) bug early.
Most helpful comment
@dermidgen : I just released
[email protected]which should address this issue