This is an exact copy of the NodeJS βpathβ module published to the NPM registry.
$ npm install --save path
MIT
NodeJS 'path' module
License: MIT License
This is an exact copy of the NodeJS βpathβ module published to the NPM registry.
$ npm install --save path
MIT
The current installation instructions for this package are to type the following:
npm install --save path
However, the package installs when you type the following:
npm install path --save
Someone has been emailing me from [email protected] asking for write and publish access to the repo and npm module.
I don't even know if I still have access, but in light of recent events, and considering that I don't know the person personally, I've said no - he can PR and we'll review it, and he's persisted that he wants write and publish access.
I just want to document that here because I don't know if it's the real Tony Mobily or not, and it seems that kind of conversation should have come up as an issue first - and I don't see any activity from him here.
My suggestion is that we don't give anyone new access as this is an obvious target for supply chain vulnerability and anyone writing new code should probably be using the path functions available via new URL()
, in most cases.
Missing documentation on npmjs.com and here on github too. Please add it. I was searching the purpose of this dev and found nothing.
1)my config.js
`'use strict'
'use strict'
const path = require('path')
const utils = require('./utils')
const config = require('../config')
const vueLoaderConfig = require('./vue-loader.conf')
var PostCompilePlugin = require('webpack-post-compile-plugin')
var TransformModulesPlugin = require('webpack-transform-modules-plugin')
function resolve (dir) {
return path.join(__dirname, '..', dir)
}
const createLintingRule = () => ({
test: /.(js|vue)$/,
loader: 'eslint-loader',
enforce: 'pre',
include: [resolve('src'), resolve('test')],
options: {
formatter: require('eslint-friendly-formatter'),
emitWarning: !config.dev.showEslintErrorsInOverlay
}
})
module.exports = {
context: path.resolve(__dirname, '../'),
plugins: [
// ...
new PostCompilePlugin(),
new TransformModulesPlugin()
],
entry: {
app: './src/main.js'
},
output: {
path: config.build.assetsRoot,
filename: '[name].js',
publicPath: process.env.NODE_ENV === 'production'
? config.build.assetsPublicPath
: config.dev.assetsPublicPath
},
resolve: {
extensions: ['.js', '.vue', '.json'],
alias: {
'vue$': 'vue/dist/vue.esm.js',
'@': resolve('src'),
'jsencrypt$':'jsencrypt/bin/jsencrypt.min.js',
'$common': path.resolve('src/common')
}
},`
2)npm run dev
3) error
these dependencies were not found:
The path
module got some new additions in Node v0.12. It would be great to add them to this package for consistency and feature-parity.
In windows 10 edge browser, all resolve result will prefix /
e.g 1
path.resolve('', 'C:/<path>')
will get
/C:/<path>
it suppose to get
C:/<path>
e.g 2
path.resolve('C:/<path>', 'a/b/c')
will get
/C:/<path>/a/b/c
it suppose to get
C:/<path>/a/b/c
Hello,
More than issue is a question , when I use the path package in my nodejs server (express) example: path.resolve('./public/index.html') , I dont know why package path adds /bin in my route.
The path should be '.../public/index.html' and with de path package '.../bin/public/index.html'
I'm using a nodejs , with reverse proxy Nginx.
Do u know why happen?
Regards.
HE SUCKS AT CODING
Hi
I just found out that if you do:
path.join("dir1", "@dir2");
It fails... :)
Why would anyone need to install this module when it comes bundled with npm?
Steps to reproduce:
path.join("/root", "../something")
something
Expected result:
/root/../something
This module implicitly depends on process
, which isn't defined outside of Node. Prior to a2f87c3, this module had an extra var process = process || {};
in path.js that allowed the use of functions that don't meaningfully rely on process
.
And since it sounds like people shouldn't be using this module in Node itself (#6), this problem might affect most legitimate users of this module.
See philc/vimium@da57280 for an example of a legitimate use of this library that was broken by the removal of var process = process || {};
.
Before NPM version 3.0.0, I could use modules that require()
'd this module, and then go ahead and use the Node core path
module all I wanted. But now in NPM@3, the entire dependency tree is installed as flat as possible in the node_modules
folder. This means that if I use a module that uses this module, I can no longer use the native path
module anymore, because this one overwrites it. I did not put this module in my package.json
as a dependency, an yet I am forced to use it. This should NOT be possible. If it's important to provide mirrors of the Node core modules in NPM, they should be under a different name. This wouldn't cause any problems, but it would solve this one.
It would be very useful for code that runs in browsers and Node to have this package available as standard JS modules.
I realize that the package seems unmaintained at this point, but maybe there's someway this could be contributed.
Could new maintainers be added to the project so that PRs could be accepted and new versions published to npm?
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.