Git Product home page Git Product logo

egg-view-assets's Issues

egg-view-assets1.8.1版本,dev_server.js文件中对于win32环境下,env.PATH的路径错误写法

在此输入你需要反馈的 Bug 具体信息(Bug in Detail):

1.我的机器是window,然后Egg项目中引入了egg-view-assets,版本1.8.1,并设置了相关的命令参数:
config.assets = {
publicPath: '/public',
devServer: {
command: 'cross-env UMI_ENV=dev umi dev --port=8007',
port: 8007,
env: {
APP_ROOT: appInfo.baseDir,
BROWSER: 'none',
ESLINT: 'none',
SOCKET_SERVER: 'http://127.0.0.1:8007',
PUBLIC_PATH: 'http://127.0.0.1:8007',
},
},
};
2.也就是跑cross-env命令去启动umi。但是启动后,会提示:cross-env命令找不到的错误。
3.跟进下来发现,egg-view-assets这个文件中,startAsync()的启动中,有一个Path的拼接过程。
4.env.PATH = ${this.app.config.baseDir}/node_modules/.bin:${env.PATH};,这里面用的是“/”,这是linux的写法。windowx环境下应该使用 \ 来代替(两个\)

可复现问题的仓库地址(Reproduction Repo)

https://github.com/eggjs/egg-view-assets/blob/master/lib/dev_server.js

Node 版本号:

16.14.0

Eggjs 版本号:

2.36.0

相关插件名称与版本号(PlugIn and Name):

egg-view-assets: 1.8.1

操作平台与版本号(Platform and Version):

Window10 专业版 21H2

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.