Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

考虑下支持下NODE_PATH #5

Open
cblh opened this issue Oct 25, 2017 · 0 comments
Open

考虑下支持下NODE_PATH #5

cblh opened this issue Oct 25, 2017 · 0 comments

Comments

@cblh
Copy link

cblh commented Oct 25, 2017

let templatePath = path.join(__dirname, '../../node_modules/', './spritesheet-templates-steamer/lib/templates/' + style + retinaTpl + '.template.handlebars');

求支持环境NODE_PATH

如果有设置 NODE_PATH,node 加载非相对/绝对路径时,就会以所设定的 NODE_PATH 做为根路径,进行模块加载。

[email protected] dist /data/frontend/install/AlloyDist/runtime-steamer-vue/runtime/R009892/test/client
cross-env NODE_ENV=production node ./tools/script.js

fs.js:634
return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
^

Error: ENOENT: no such file or directory, open '/data/frontend/install/AlloyDist/runtime-steamer-vue/runtime/R009892/test/client/node_modules/spritesheet-templates-steamer/lib/templates/less.template.handlebars'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant