Closed junerleer closed 7 years ago
Please run npm intsall
before compilation
thanks for your reply.
my real problem is I used the framework called thinkjs v2.2
the structure is as bellow
--app/ code after babel
--node_modules/
--www/
--www/production.js entry.js
--www/static/ assets resources
--view/ view templates
--package.json
Real project is complex, so I use the thinkjs-cli create the easiest demo. Then I config the package.json and modified the entry.js.
--package.json--
"bin":"www/production.js", "pkg":{ "assets":["view/**/*","www/static/*"], "scripts":["app/*.js"] },
--production.js-- ` var thinkjs = require('thinkjs'); var path = require('path');
var rootPath = path.dirname(__dirname)
var instance = new thinkjs({ APP_PATH: path.join(rootPath,'app'), RUNTIME_PATH: path.join(rootPath,'runtime'), ROOT_PATH: rootPath, RESOURCE_PATH: path.join(rootPath,'www'), env: 'production' });
instance.run(true); ` I can generate the executable file successfully, but it stills run with error
the test demo url is "https://github.com/junerleer/pkg_demo"
@igorklopov I am confused about the snapshot,I really config the pkg options in package.json
Environment system:win 7 node:8.3.0
the error pic :