debashish2014 / local-package-publisher Goto Github PK
View Code? Open in Web Editor NEWA utility app for publishing your npm packages locally for testing
License: MIT License
A utility app for publishing your npm packages locally for testing
License: MIT License
Hi guys.
Following the documentation, I tried to globally publish a package name super running local-package-publisher --publish
in the project root directory.
I'm on Mac Os X (with node version v15.14.0) and get an error like the following:
super package published successfully to global
To consume this package, run npm link super in target project
node:internal/bootstrap/switches/does_own_process_state:112
rawMethods.chdir(directory);
^
Error: ENOENT: no such file or directory, chdir '/Volumes/x/dev/super' -> '/var/folders/vf/9bptzv4d4cxfym7g6bt9yyrw0000gn/T/tmp-60750SDC706yNP5V'
at process.wrappedChdir (node:internal/bootstrap/switches/does_own_process_state:112:14)
at process.chdir (/Users/me/.nvm/versions/node/v15.14.0/lib/node_modules/local-package-publisher/node_modules/graceful-fs/polyfills.js:22:11)
at /Users/me/.nvm/versions/node/v15.14.0/lib/node_modules/local-package-publisher/index.js:138:17
at new Promise (<anonymous>)
at linkDirGlobal (/Users/me/.nvm/versions/node/v15.14.0/lib/node_modules/local-package-publisher/index.js:129:12)
at /Users/me/.nvm/versions/node/v15.14.0/lib/node_modules/local-package-publisher/index.js:324:13 {
errno: -2,
code: 'ENOENT',
syscall: 'chdir',
path: '/Volumes/x/dev/super',
dest: '/var/folders/vf/9bptzv4d4cxfym7g6bt9yyrw0000gn/T/tmp-60750SDC706yNP5V'
}
The .local-pack
folder is created and contains the settings.json
file with the following content:
{"TempPath":"/var/folders/vf/9bptzv4d4cxfym7g6bt9yyrw0000gn/T/tmp-60750SDC706yNP5V"}
It's like there is a problem with the temp folder, it doesn't seem to be created.
Any idea? Thanks!
When I try to use this tool it hangs when I try to publish my package. I left it running for 3 hours last night.
It creates the <package>-<version>.tgz
file in the root folder of the package.
Unfortunately, it never builds the .local-pack folder and it does not seem to create the npm link for my project to use, because in my project that consumes it, I use npm link <package>
and then npm install <package>
and it is still pulling from the externally published registry with the previous version.
When I try to publish on Windows, I get no such file or directory
errors. I'm guessing this is a path issue, where somehow it's not recognizing the OS and not converting /'s to 's or something?
The specific error is:
C:\Users\{userName}\AppData\Roaming\npm/node: line 8: C:\Users\{userName}\AppData\Roaming\npm/node_modules/node/bin/node: No such file or directory
Windows 11 Pro; version 10.0.22000 Build 22000
Is there a workaround for this?
Hey,
this is a really useful library, thanks for sharing it!
However, for my current problem I'm trying to locally publish an Angular library, so the contents to be published lie under dist/
. I think the easiest would be, to have another CLI option to specify the path to be published. Do you think this is possible to be added?
Thanks in advance
Alex
Actual behavior:
With package.json looking similiar to this:
"name": "@mynamespace/mypackage",
"description": "....",
"version": "1.0.0",
"main": "dist/index.js",
"module": "dist/index.es.js",
"files": [
"dist"
],
"peerDependencies": {
"classnames": "^2.2.6",
"dinero.js": "^1.8.0",
"@material-ui/core": "^4.9.5",
"@material-ui/icons": "^4.9.1",
"@material-ui/lab": "^4.0.0-alpha.46",
.........
},
"devDependencies": {
"classnames": "^2.2.6",
"dinero.js": "^1.8.0",
"axios": "^0.21.1",
"prop-types": "^15.7.2",
"react-responsive": "^8.2.0",
"lodash.throttle": "^4.1.1",
"js-cookie": "^2.2.1",
"moment": "^2.28.0",
"react-html-parser": "^2.0.2",
"react": "^16.13.0",
"react-dom": "^16.13.0",
"react-i18next": "^11.8.5",
"react-responsive": "^8.2.0",
.......
it seems to be installing all the dev dependencies when publishing.
Expected behavior: install only peers if missing.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.