We've recently tried to upgrade to node v7.0.0 on our build server, but started to have issues during the application build task failing on the "bower_concat" step:
Loading "bower-concat.js" tasks...ERROR
Error: Cannot find module 'internal/fs'
What we have installed:
node
v7.0.0 (installed via yum
"nodesource" repository)
npm
4.0.1
- using
grunt
(if this is relevant)
grunt-bower-concat
0.6.0
The grunt build task configuration:
grunt.registerTask(
'build:prod', [
'clean:prod',
'copy:prod',
'replace',
'bower_concat',
'ngtemplates',
'concat',
'uglify',
'cssmin',
'injector:prod',
'copy:cssfix',
'copy:dist',
'bowercopy:dist',
'bowercopy:fonts',
'template:setProdVersion'
]
);
And the grunt bower_concat
task:
bower_concat: {
all: {
dest: '<%= app.build %>/bower.js',
cssDest: '<%= app.build %>/bower.css',
dependencies: {
'bootstrap': 'jquery'
},
mainFiles: {
"angular-app-modules": [
"app/dist/angular-app-modules.min.js",
"app/dist/angular-app-modules.min.css"
]
}
}
},
Note that it works without any problems on node v6.9.0.
What can be causing the issue? Can we workaround the problem without downgrading to node v6?
There is also this relevant issue, but, as of now, the information there does not help in our case.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…