TypeError: Cannot set property 'committish' of undefined
See original GitHub issueI got an error when trying to publish my package to npm. At this point, I’m pulling out my hair trying to get this to work.
Expected Behavior
npx lerna publish
This should publish my package to npm 🤷♂ .
Current Behavior
I applied a console.log() to C:\Users\jtenner\Desktop\projects\as-pect\node_modules\@lerna\package\index.js:220:25
just to see what was going on.
Changes:
- @as-pect/assembly: 2.1.2 => 2.1.3
- @as-pect/cli: 2.1.2 => 2.1.3
- @as-pect/core: 2.1.2 => 2.1.3
? Are you sure you want to create these versions? Yes
lerna info execute Skipping releases
{
type: 'git',
registry: undefined,
where: undefined,
raw: '@as-pect/assembly@git:github.com/jtenner/as-pect/assembly#v2.1.2',
name: '@as-pect/assembly',
escapedName: '@as-pect%2fassembly',
scope: '@as-pect',
rawSpec: 'git:github.com/jtenner/as-pect/assembly#v2.1.2',
saveSpec: 'git:github.com/jtenner/as-pect/assembly#v2.1.2',
fetchSpec: 'git:github.com/jtenner/as-pect/assembly',
gitRange: undefined,
gitCommittish: 'v2.1.2',
hosted: undefined
}
lerna ERR! TypeError: Cannot set property 'committish' of undefined
lerna ERR! at Package.updateLocalDependency (C:\Users\jtenner\Desktop\projects\as-pect\node_modules\@lerna\package\index.js:220:25)
lerna ERR! lerna Cannot set property 'committish' of undefined
Repo is here: https://github.com/jtenner/as-pect
Steps to Reproduce (for bugs)
git clone
npm install
npx lerna bootstrap
npx lerna publish
lerna.json
{
"packages": [
"packages/*"
],
"version": "2.1.2"
}
Context
Just spent the last week converting everything in as-pect
to a mono repo and I can’t seem to publish my software.
Your Environment
Executable | Version |
---|---|
lerna --version |
v3.15.0 |
npm --version |
v6.9.0 |
node --version |
v12.6.0 |
| OS | Version | | Windows 10 | 1607 |
Questions:
- Is there anything I can do to help?
Update:
I managed to fix the package.json configurations to match the example. For instance, here is the CLI package.json
{
"repository": {
"type": "git",
"url": "https://github.com/jtenner/as-pect/tree/master/packages/cli"
},
"dependencies": {
"@as-pect/assembly": "github:jtenner/assembly#v2.1.3",
"@as-pect/core": "github:jtenner/core#v2.1.3",
}
}
I don’t know if this is correct, because when I try to install the cli I get the following error in the console:
npm ERR! Error while executing:
npm ERR! C:\Program Files\Git\cmd\git.EXE ls-remote -h -t ssh://git@github.com/jtenner/assembly.git
npm ERR!
npm ERR! Warning: Permanently added the RSA host key for IP address '{IP Address}' to the list of known hosts.
npm ERR! git@github.com: Permission denied (publickey).
npm ERR! fatal: Could not read from remote repository.
npm ERR!
npm ERR! Please make sure you have the correct access rights
npm ERR! and the repository exists.
npm ERR!
npm ERR! exited with error code: 128
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\jtenner\AppData\Roaming\npm-cache\_logs\2019-07-15T14_01_36_156Z-debug.log
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Uncaught TypeError: Cannot set property 'display' of undefined
The getElementsByClassName method of Document interface returns an array-like object of all child elements which have all of the given class ...
Read more >Error "Uncaught TypeError: Cannot set property 'value' of ...
It was perfectly working and now it does not work. The code has not changed at all. I have not touched the project...
Read more >TypeError: Cannot set properties of Undefined in JavaScript
The "Cannot set properties of undefined" error occurs when setting a property on an `undefined` value. To solve the error conditionally check if...
Read more >Viewing online file analysis results for '644.apk'
No longer enforced. android.permission.READ_LOGS, Allows an application to read the low-level system log files. android.permission.
Read more >Uncaught TypeError: Cannot set property
In JavaScript if a variable has been declared, but has not been assigned a value, is automatically assigned the value undefined.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Just use the same version specifiers you would as if the packages were all living in their own repos (e.g.,
"my-local-sibling": "^1.0.3"
wheremy-local-sibling
’s version is 1.0.3). Lerna will find them, and update them appropriately when changes are detected.Thank you for the help. 👍