Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
745 views
in Technique[技术] by (71.8m points)

vue ;node

vue在node下面创建项目时,一直报错 Cannot find module './lib/cookies',但本身是有这个模块的,请问怎么解决?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

很简单,引用路径错误。你这个./lib/cookies是自己的还是通过npm install得到的插件?
如果是后者只写模块名称就好了也就是require("cookies")
如果是你写的那么把相对路径捋顺就好了


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...