This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
If there is simple code #!/usr/bin/env node import {basename} from "path" then the import expression is marked as error. It's caused, because there is hash-bang on the first line, which is replaced by an anonymous function. So the parsed source then looks like: (function(){ import {basename} from "path" }()); We have to change the logic, when to wrap nodejs code to the top level function.
Fixed in web-main
Integrated into 'main-silver', will be available in build *201606230002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/01a1fdcdeb1b User: Petr Pisl <ppisl@netbeans.org> Log: #262527 - Marking import expression as error when is used node hash-bang