Code Monkey home page Code Monkey logo

Comments (3)

TonyJiangWJ avatar TonyJiangWJ commented on July 24, 2024

我试了并没有问题,你也不给个日志,我咋看

from ant-forest.

arliong avatar arliong commented on July 24, 2024

1, 我重新试过, 从手机上auto.js app直接执行main.js, 无论这个程序是放在哪里,都没有问题.
2, 我从Tasker调用 main.js. 或者是从电脑的vs上运行main.js, 都报一样的错误;
前提是, 我已经运行过config.js并且也有过将配置导出;
auto.js 版本是4.1.1a

错误日志如下:

[Extension Host] 14:14:18.527/V: 开始运行[[remote]config.js]
console.ts:137 [Extension Host] 14:14:18.647/E: ReferenceError: "module" is not defined. ([remote]config.js#151)
ReferenceError: "module" is not defined.
at [remote]config.js:151:0
console.ts:137 [Extension Host] 14:14:18.648/V:

[[remote]config.js]运行结束,用时0.121000秒
console.ts:137 [Extension Host] 14:14:35.843/V: 开始运行[[remote]main.js]
console.ts:137 [Extension Host] 14:14:35.853/E: Error: Can't resolve relative module ID "./config.js" when require() is used outside of a module (file:///android_asset/modules/jvm-npm.js#89)
Error: Can't resolve relative module ID "./config.js" when require() is used outside of a module
at Require (file:///android_asset/modules/jvm-npm.js:89:0)
at [remote]main.js:7:0
console.ts:137 [Extension Host] 14:14:35.853/V:

[[remote]main.js]运行结束,用时0.010000秒

from ant-forest.

TonyJiangWJ avatar TonyJiangWJ commented on July 24, 2024

你这个明显是使用方式有问题。
拜托你看一下AutoJS插件的使用方式,这个是一整个项目,使用VSCODE插件时需要执行的是run project 而不是执行某个文件

from ant-forest.

Related Issues (20)

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.