When I try to lift sails app using sails lift --prod
it gives error in production.js file. Saying that Warning: Uglification failed. Unexpected character '#'. Line 12432 in .tmp/public/concat/production.js
Warning: Uglification failed. Unexpected character '#'. Line 12432 in .tmp/public/concat/production.js
I search that and found it was comming from a js file from my assets which had
#!/usr/bin/env node
When I remove this line and try to do sails lift --prod it get stucks in
Don't know what's the error. Can anyone help me?
tasks->register->prod.js
comment one line
module.exports = function (grunt) {
grunt.registerTask('prod', [
'compileAssets',
'concat',
// 'uglify',
'cssmin',
'sails-linker:prodJs',
'sails-linker:prodStyles',
'sails-linker:devTpl',
'sails-linker:prodJsJade',
'sails-linker:prodStylesJade',
'sails-linker:devTplJade'
]);
};
Don't know if this is good or bad but it finally lifted. reference
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.