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

module "npm/@tarojs/taro-weapp/index.js" is not defined #345

Closed
nickrogit opened this issue Jul 18, 2018 · 11 comments
Closed

module "npm/@tarojs/taro-weapp/index.js" is not defined #345

nickrogit opened this issue Jul 18, 2018 · 11 comments

Comments

@nickrogit
Copy link

按官方步骤初始项目,编译后报以下错误,怎么解决?
VM634:1 thirdScriptError
sdk uncaught third Error
module "npm/@tarojs/taro-weapp/index.js" is not defined
Error: module "npm/@tarojs/taro-weapp/index.js" is not defined
at require (http://127.0.0.1:59663/appservice/__dev__/WAService.js:22:7213)
at http://127.0.0.1:59663/appservice/__dev__/WAService.js:22:7068
at http://127.0.0.1:59663/appservice/app.js:9:14
at require (http://127.0.0.1:59663/appservice/__dev__/WAService.js:22:7354)
at http://127.0.0.1:59663/appservice/appservice?t=1531897044619:1031:9

@yuche
Copy link
Contributor

yuche commented Jul 18, 2018

安装不完整,cnpm 再装一次试试?

@nickrogit
Copy link
Author

cnpm install -g @tarojs/cli安装了问题依旧

@yuche
Copy link
Contributor

yuche commented Jul 18, 2018

应该是重新安装 taro init 那个目录的依赖,这里是本地的依赖没找到

@Harhao
Copy link

Harhao commented Jul 21, 2018

重新安装项目依赖之后,编译源码之后,还是会出现这个错误

@luckyadam
Copy link
Member

确定项目依赖安装好了么

@guotie
Copy link
Contributor

guotie commented Aug 9, 2018

init项目后没有报错,然后增加一个页面后报错,是什么原因

@luckyadam
Copy link
Member

@guotie 是报啥错嘞

@guotie
Copy link
Contributor

guotie commented Aug 9, 2018

在刚才关闭的issue中反馈了,应该是微信开发工具的问题

@luckyadam
Copy link
Member

OJBK 那先关闭啦~

@yuhong-l
Copy link

yuhong-l commented Nov 25, 2018

@luckyadam
遇到这个问题,无法解决,似乎是node_modules文件夹里面齐全,但是dist文件夹下的生成的npm文件夹总是会少东西。
可以看到编译之后taro文件夹里只有一个index.js,然而里面会引用一个./dist/index.js并不存在。
即使手动从node_modules里复制过来,下次编译还是会重新生成只有index.js一个文件。
image

@1ihu
Copy link

1ihu commented Apr 29, 2022

解决了么

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

7 participants