在搜索了一会儿之后,我认为它与使用maven和net bean构建应用程序有关,但我似乎无法找到关于它的好文档.使用nbaction.xml可以实现哪个目标?对于Eclipse来说,哪一个是相同的,如果有的话呢?
I've got an ApolloServer project that's giving me trouble, so I thought I might update it and ran into issues when using the latest Babel. My "index.js" is:
require('dotenv').config()
import {startServer} from './server'
startServer()
Run Code Online (Sandbox Code Playgroud)
And when I run it I get the error "SyntaxError: Cannot use import statement outside a module". First I tried doing things to convince TPTB* that this was a module (with no success). So I changed the "import" to a "require" and this worked.
But now …